Skip to content

Instantly share code, notes, and snippets.

View e1t0n's full-sized avatar
🤙

e1t0n e1t0n

🤙
  • London
View GitHub Profile
@e1t0n
e1t0n / iterm2-solarized.md
Created March 21, 2022 12:49 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

"""Simple HTTP Server. SSL, POST, PUT
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
https://github.com/ksmith97/GzipSimpleHTTPServer
"""
__version__ = "0.6"
// http://stackoverflow.com/questions/8075147/replace-all-nsnull-objects-in-an-nsdictionary
#import <Foundation/Foundation.h>
@interface NSObject (NullReplacement)
/// Replace all NSNull and nil objects in a dictionary or array.
- (id)el_replaceNullValues;
@end
func printFonts() {
let fontFamilyNames = UIFont.familyNames()
for familyName in fontFamilyNames {
println("------------------------------")
println("Font Family Name = [\(familyName)]")
let names = UIFont.fontNamesForFamilyName(familyName as! String)
println("Font Names = [\(names)]")
}
}
//tradingview.com pine script
study("Average Directional Index with Threshold", shorttitle="ADX")
adxlen = input(14, title="ADX Smoothing")
dilen = input(14, title="DI Length")
dirmov(len) =>
up = change(high)
down = -change(low)
truerange = rma(tr, len)
plus = fixnan(100 * rma(up > down and up > 0 ? up : 0, len) / truerange)
minus = fixnan(100 * rma(down > up and down > 0 ? down : 0, len) / truerange)
@e1t0n
e1t0n / FIXME
Created June 20, 2014 15:02
FIXME TODO XCODE SCRIPT
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" \) -print0 | \
xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | \
perl -p -e "s/($KEYWORDS)/ warning: \$1/"