Skip to content

Instantly share code, notes, and snippets.

View beltex's full-sized avatar

Omeed beltex

View GitHub Profile
@0xabad1dea
0xabad1dea / singularthey.md
Last active June 18, 2022 18:01
Singular They in Technical English

Guidelines for Singular They in Technical English

by 0xabad1dea, December 2014

This document is an RFC of sorts for increasing the adoption rate of Singular They in technical English. This is not an ultimatum; this is not shaming anyone who has done otherwise; and this is definitely not applicable to any other language.

What is Singular They?

@ivan3bx
ivan3bx / ansi_color_output.swift
Created December 7, 2014 23:01
ANSI color sequence example in Swift (Unicode)
let escape = "\u{001B}["
let none = escape + "0m"
let red = escape + "0;31m"
let green = escape + "0;32m"
let yellow = escape + "0;33m"
println("\(red)Everything \(green)or \(yellow)nothing\(none).")
@natecook1000
natecook1000 / dumpmodule.sh
Created October 8, 2014 21:05
Dump the Swift-synthesized headers for a module
#! /bin/sh
# usage: <shellscript> [--osx] typename
if [ "$1" = "--osx" ] ; then
echo ":print_module $2" | xcrun swift -deprecated-integrated-repl
else
sdk_path=$(echo `xcrun --show-sdk-path` | sed 's#MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk#iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk#')
echo ":print_module $1" | xcrun swift -deprecated-integrated-repl -sdk "$sdk_path"
fi
@jpsim
jpsim / JAZMusician.h
Created July 7, 2014 09:25
SourceKit Playground
//
// JAZMusician.h
// JazzyApp
//
#import <Foundation/Foundation.h>
/**
JAZMusician models, you guessed it... Jazz Musicians!
From Ellington to Marsalis, this class has you covered.
@nolili
nolili / gist:48fb7d1f81b6b54554a4
Created June 30, 2014 02:06
Swift C like array
// Array to NSData
var cArray:Array<UInt8> = [0x01, 0x02, 0x03]
var data = NSData(bytes:cArray, length:sizeof(UInt8) * cArray.count)
println(data)
// NSData to Array
var bufferArray:Array<UInt8> = [0x00, 0x00, 0x00]
data.getBytes(&bufferArray, length:3)
println(bufferArray)
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@nickloewen
nickloewen / bret_victor-reading_list.md
Last active March 7, 2024 18:14
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

@chrismccoy
chrismccoy / gitcheats.txt
Last active April 20, 2024 08:50
git cheats
# alias to edit commit messages without using rebase interactive
# example: git reword commithash message
reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f"
# edit all commit messages
git rebase -i --root
# clone all your repos with gh cli tool
gh repo list --json name -q '.[].name' | xargs -n1 gh repo clone
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 5, 2024 18:31
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!