Skip to content

Instantly share code, notes, and snippets.

@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Created April 14, 2014 07:51
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Overengineering mixin output
// By caching values and on-the-fly generating placeholders
// Clever and crazy. I like it so far.
// ---
@axemclion
axemclion / Readme.md
Last active August 29, 2015 14:03
GPU Composited CSS - Performance

Ariya Hidayat has written an excellent article on GPU Composited CSS and how it can be used to optimize web rendering performance.

The impact of adding CSS transforms is evident in developer timline and this experiment is a way to capture that information using browser-perf. The results from this experiment clearly indicate how certain CSS properties move rendering load to the GPU, and how that that impact the overall responsiveness of the page.

Pre-requisites

  1. Ensure that you have node and npm installed
  2. Ensure that you have Selenium running, or can connect to Sauce Labs
  3. Dowload this gist using git clone https://gist.github.com/853d34ebd776047836f3.git
  4. Install other dependencies using npm install
// Puncture a closure, absolute madness
Function.prototype.puncture = function(){
var wormhole = function(__cmd__){
return eval(__cmd__);
};
var source = ('' + this).match(/function.+?\{([\s\S]*)\}/)[1];
var fn = new Function('this.wormhole=' + wormhole + '\n' + source);
@jonathan-beebe
jonathan-beebe / fix_alcatraz_plugins.sh
Last active December 9, 2015 18:36
Fixing Alcatraz after upgrading Xcode
# Upgrading Xcode can wreak havok on your custom Alcatraz setup.
# Each plugin must list the UUIDs of Xcode that it supports. Thus
# with each new release we must update the list of UUIDs for each
# plugin we want to continue using.
#
# You can discover the UUID of an Xcode app bundle by running this command
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
# > 7FDF5C7A-131F-4ABB-9EDC-8C5F8F0B8A90
//
// NSObject+BlockObservation.h
// Version 1.0
//
// Andy Matuschak
// andy@andymatuschak.org
// Public domain because I love you. Let me know how you use it.
//
typedef NSString AMBlockToken;
@clarkbw
clarkbw / ios-debugger.md
Last active September 19, 2016 20:54
Instructions for the debugger.html to debug Safari running in the iOS simulator

Safari

These are the instructions for getting the debugger.html project to connect to and debug Safari on various platforms.

iOS Simulator (Mac only)

Requirements

  • Xcode
  • Download and install Xcode from Apple
@robhurring
robhurring / shBrushRuby.js
Created July 17, 2009 01:04
GitHub style syntax highlighter theme
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
*
* @version
* 2.0.320 (May 03 2009)
*
@paulrouget
paulrouget / functions.html
Last active August 3, 2017 16:44
Defining JavaScript functions, the ES6 way
<!DOCTYPE html>
<meta charset=utf-8 />
<title>Defining JavaScript functions, the ES6 way</title>
<h1>Defining JavaScript functions, the ES6 way</h1>
<em>Use Firefox 22 (Firefox Nightly)</em>
<script>
@interface NSObject (Debounce)
- (void)debounce:(SEL)action delay:(NSTimeInterval)delay;
@end
@swizzlr
swizzlr / blockdeclsyntax.md
Created August 19, 2013 13:11
Block Declaration Syntax List, originally by [pcperini](http://stackoverflow.com/a/9201774/929581), parsed to markdown for printing with your favourite CSS (I recommend @ttscoff's Marked)

List of Block Declaration Syntaxes

Throughout, let

  • return_type be the type of object/primitive/etc. you'd like to return (commonly void)
  • blockName be the variable name of the block you're creating
  • var_type be the type object/primitive/etc. you'd like to pass as an argument (leave blank for no parameters)
  • varName be the variable name of the given parameter And remember that you can create as many parameters as you'd like.

Blocks as Variables

Possibly the most common for of declaration.