Skip to content

Instantly share code, notes, and snippets.

View iggym's full-sized avatar
🎯
😄

Iggy iggym

🎯
😄
View GitHub Profile
@iggym
iggym / log-usage-SKILL.md
Created November 3, 2026 22:22
log-usage: a Grok Bot skill to check usage (and today's remaining budget) once and save it to a repo, no polling
name log-usage
description Use when you want to know how much Grok Bot usage is left (this week or today), or want a usage snapshot saved to a repo. One check, one commit, no polling.

Log usage (Grok Bot skill)

Stop asking your bots for status reports. This skill does one cheap check of your weekly usage limit, works out how much you can still use today, and saves a snapshot to a markdown file in any git repo you use for housekeeping. It never runs on a schedule; each check costs usage, so it runs only when you type /log-usage.

Setup

  • Have a git repo cloned on your bot's computer with a state/usage.md file (it gets created on the first run).
@iggym
iggym / gist:d04ac4d73ed902e56b27327597a8aeac
Created August 20, 2020 16:44 — forked from 480/gist:3b41f449686a089f34edb45d00672f28
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Render markdown in xcode 11

cd .. ./[project-name]/projec-name.xcodeproj

there's usually a .pbxproj, .xcworkspace, xcuserdata files ...

Add .xcodesamplecode.plist

#!/bin/bash
# script to restart macOS bluetooth with reboot
# see related link https://gist.github.com/nicolasembleton/afc19940da26716f8e90
# stop bluetooth dameon
sudo kill -9 `pgrep bluetoothd`
# start bluetooth dameon
sudo launchctl start com.apple.bluetoothd
@iggym
iggym / URLSession Calls in Swift 4
Created June 27, 2018 06:11 — forked from cmoulton/URLSession Calls in Swift 4
URLSession Calls in Swift 4
func makeGetCall() {
// Set up the URL request
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1"
guard let url = URL(string: todoEndpoint) else {
print("Error: cannot create URL")
return
}
let urlRequest = URLRequest(url: url)
// set up the session

Use HTTPS:

change remote url to https:

git remote set-url origin https://USERNAME@github.com/USERNAME/PROJECTNAME.git and you are good to go:

git push To ensure that the commits appear as performed by USERNAME, one can setup the user.name and user.email for this project, too:

@iggym
iggym / iterm2-solarized.md
Created May 2, 2017 07:22 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@iggym
iggym / Xcode-8-Shortcuts.md
Last active April 30, 2017 23:23
Some useful Xcode 8 shortcuts

Some Xcode shortcuts that i use often


Open Files in tabs

  • When clicking on a file in the Navigator, hold down SHIFT + OPT
  • When clicking on a symbol in an editor pane, hold down SHIFT + OPT + CMD

A pop-over will appear and let you choose where exactly you want this file to be displayed


@iggym
iggym / .bash_profile
Last active April 27, 2017 06:54 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@iggym
iggym / funct_in_swift.swift
Created January 18, 2017 15:29
function in swift
func doSomeStuff(person: String) -> String {
let greeting = "Hello, " + person + "!"
return greeting
}