This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'editor': | |
'lineHeight': 1.45 | |
'softWrap': true | |
'normalizeIndentOnPaste': true | |
'tabLength': 2 | |
'preferredLineLength': 100 | |
'invisibles': | |
'cr': '↩' | |
'eol': '' | |
'space': '·' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------------------------------------------------------------------- */ | |
/* */ | |
/* Improved upon a mixin from 37signals and combined */ | |
/* with these numbers from marc. */ | |
/* */ | |
/* 37signals-version: */ | |
/* http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss */ | |
/* */ | |
/* @kimroen */ | |
/* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Monitor the translate_service and restart it should it die. | |
-module(doctor_translate). | |
-export([loop/0]). | |
loop() -> | |
process_flag(trap_exit, true), | |
receive | |
new -> | |
io:format("Creating and monitoring process.~n"), | |
register(translator, spawn_link(fun translate_service:loop/0)), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the following line to your project in Framer Studio. | |
# `frameless = require "frameless"` | |
frameless = {} | |
# Directly opens the prototype in Frameless | |
frameless.open = -> | |
intent = "frameless://" | |
url = intent + window.location.host + window.location.pathname + "/" | |
window.location.replace url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
WHAT: A very simple example of redux + redux-simple-router using Typescript. | |
WHY: The official example found here: https://github.com/rackt/redux-simple-router/tree/1.0.2/examples/basic has problems: | |
1) it is spread over many files making it very hard to "skim" | |
2) it is organized by function, not by feature. (Example: learning "how to manipulate redux state" is spread over 5 files in 4 folders) | |
3) there are no comments explaining what's going on/why. | |
WHO: by JasonS@Novaleaf.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const UUIDS = { | |
INFO: 0x180A, | |
TEMPERATURE: 0x1809, | |
BATTERY: 0x180F, | |
}; | |
const mainLoopTimeout = 60000; | |
const buttonPressTimeout = 5000; | |
const buttonInitialValue = 0; | |
const buttonValueIncrement = 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function tween( time, update ) { | |
const start = Date.now(); | |
var isCanceled = false; | |
var isComplete = false; | |
var chain = []; | |
function loop() { | |
if ( isCanceled ) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let uuid = getSystemUUID() { | |
let filepath = ("~/Library/Preferences/ByHost/com.apple.notificationcenterui.\(uuid).plist" as NSString).stringByExpandingTildeInPath | |
if let dict = NSDictionary(contentsOfFile: filepath), doNotDisturbState = dict["doNotDisturb"] as? Bool { | |
print(doNotDisturbState) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--------------------------------------------------------------------------// | |
// Flow field animator by Etienne Jacob (www.necessary-disorder.tumblr.com) // | |
// Processing code (https://processing.org) // | |
// Saves frames, then you must use something else to make the GIF // | |
//--------------------------------------------------------------------------// | |
/// This code starts with the rendering system I took from @beesandbombs | |
/// (it also contains some useful functions and stuff) | |
/// You don't have to understand it | |
/// Just know that it does an average on many drawings to get a motion blur effect | |
/// from drawings parametrized by the global variable t going from 0 to 1 |
OlderNewer