Skip to content

Instantly share code, notes, and snippets.

@raamdev
raamdev / f.lux-xcode-master-sha256.chk
Last active November 20, 2015 21:49
38f463ee5780a4f2b0160f9fa21dbe3c78c5d80d3c093e4ff553aaca230e2898 f.lux-xcode-master.zip
5dfb0ac3bd39f2830283cd0a5af534c43024207bbec460ca089b8edd595070fa ./.gitignore
a326fb9457de2a31fd23fb98d89f1e83dcab611ea7b85f671680094592e51c54 ./AppIcon29x29@2x.png
d276420548696edcc16610b578907305f54020763e065581f4aa5863b8585c61 ./AppIcon29x29@3x.png
adab888cd5d24313f142e9324f10ff7128d77cb30031122bb3586e333ef399a2 ./AppIcon40x40@2x.png
8fdc77ccf3964c31eb31777479a7ca5c3c056d873da610f2d9b75c99fc363ae9 ./AppIcon40x40@3x.png
eb6f6aa969998b2648ade1ee051d37f01032e6f549fc77b195bf7e4c53bf2624 ./AppIcon60x60@2x.png
626b2f4146996ab876396c4ab797b005801fdf59aa6b57e976386f0572772895 ./AppIcon60x60@3x.png
eadf312d966754f3b8d6542ea8a5db850bcceb81e6f971b7b629bc4b950b8644 ./en.lproj/fluxController_iPhone.nib
9261ecceda608ef174256e5fdc774c1e6e3dcf533409c1bc393d490d01c713f1 ./en.lproj/InfoPlist.strings
ca34f2dc83c31222a73a48053532ad901de55f014c58ffa2fbcf6c202b5448b0 ./flux.beta/AppDelegate.h
#!/usr/bin/ruby -w
require "sexp_processor"
require "ruby_parser"
class AssertScanner < MethodBasedSexpProcessor
def self.run paths
paths = expand_dirs_to_files(*paths)
paths.each do |path|
# warn path
@paulirish
paulirish / what-forces-layout.md
Last active June 10, 2026 01:58
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@50kudos
50kudos / flashflush.sh
Last active November 3, 2019 02:03
A Bash script that lists all unused css classes in html/haml/erb files for rails project (or maybe others depending on project structure)
#!/bin/bash
cat $(find app/assets/stylesheets/ -type f) |
grep -Eo '\.[a-z]+[a-z0-9_-]*' | sort | uniq | sed s/.// |
while read CSS; do
if ! grep -Erqi "([^(remove|has)]?class[(:|=|[:space:]*=>[:space:]*)]*[[:space:]\W]*[(\"|')]*[-a-z0-9[:space:]]*$CSS|\\.$CSS\b)" app/views/ vendor/assets/ app/assets/javascripts/; then
echo $CSS >> unused.scss;
fi
done
@qiaohaijun
qiaohaijun / GistList!.md
Created November 20, 2014 02:51
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text

@mahiuchun
mahiuchun / gist:174595da1b39f5a3f921
Created June 6, 2014 03:51
Use Swift like Python
swift() {
local swift_=/Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
if [[ -z $@ ]]
then
$swift_
else
$swift_ -i $@
fi
}
@bitemyapp
bitemyapp / gist:8739525
Last active June 7, 2026 11:46
Learning Haskell
@wolever
wolever / profile
Created September 11, 2013 15:41
My very fast Bash prompt, which shows git branch, virtualenv, and background jobs
# prompt examples:
# [3 jobs master virtualenv] ~/code/myproject/foo
# [1 job my-branch virtualenv] ~/code/bar/
# [virtualenv] ~/code/
# ~
# Very, very fast, only requiring a couple of fork()s (and no forking at all to determine the current git branch)
if [[ "$USER" == "root" ]]
then
export PS1="\e[1;31m\]\u \[\e[1;33m\]\w\[\e[0m\] ";

ruby-1.9.3-p484 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p484 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.