Skip to content

Instantly share code, notes, and snippets.

View raineorshine's full-sized avatar

Raine Revere raineorshine

  • New York, NY
View GitHub Profile
@jonasdt
jonasdt / instructions.markdown
Last active December 11, 2015 08:28 — forked from hijonathan/instructions.markdown
Steps to transfer Chrome Custom Search Engines to Alfred

Step 0: Clean up your search engines in Chrome.

Step 1: Use the sync script, this will overwrite your custom searches in Alfred!

> python sync_alfred.py

Alternatively, you can also import the favicons (low resolution)

> python sync_alfred.py -i

@raineorshine
raineorshine / Web Dev Shell Commands.sh
Last active December 11, 2015 18:39
Common Linux commands that I use when developing web applications.
# stylus compile & watch
stylus public/style/main.styl -w &
npm outdated # nicest way to list installed modules
npm ls # list installed modules & dependencies
npm ls -g # list globally installed node modules
npm update # check for updated versions of modules in the current package
npm view {pkg} # view a package's published metadata
npm install {pkg} --save # install the latest version of a package and add it to your package.json's dependencies
npm install {pkg} --save-dev # install and save as a devDependency
@raineorshine
raineorshine / sublime-cheatsheet.js
Created October 6, 2013 15:46
My Favorite Sublime Text 2 Commands (Mac)
// Files & Commands
cmd + p // quick file switcher
cmd + shift + p // command palette
cmd + r // quick function search
cmd + shift + r // rename file
// Selection
cmd + option + g // select all instances of word under cursor
// Find & Replace
@mauriciopoppe
mauriciopoppe / !README.md
Last active March 18, 2016 16:23
Dark theme for Sublime's Plain Task

Dark theme for Sublime's Plain Task

Installation:

  • Open the "Packages" folder
  • Save the theme under the folder PlainTasks/ with the name "tasks-monokai.hidden-tmTheme"
  • Open the user settings for the package PlainTasks
  • Update the "color-scheme" property (see the file attached below) to match the saved filename
module TimeApp ( start, Config, App ) where
{-| This module helps you start your application in a typical Elm workflow.
It assumes you are following [the Elm Architecture][arch] and using
[elm-effects][]. From there it will wire everything up for you!
**Be sure to [read the Elm Architecture tutorial][arch] to learn how this all
works!**
[arch]: https://github.com/evancz/elm-architecture-tutorial
[elm-effects]: http://package.elm-lang.org/packages/evancz/elm-effects/latest
@kejace
kejace / ehc-js.md
Last active April 19, 2016 22:43
Ethereum-haskell-client in the browser roadmap

Logging thoughts and approaches on getting (parts of) the Haskell ethereum client running in the browser.

Backends

There are a number of different alternatives. In order of appearance, I estimate the following to languages to need the least amount of porting.

  • GHCJS supports full GHC
  • Haste is full Haskell but with different libraries
  • Fay is a proper subset of Haskell
  • Elm is a Haskell-like language
anonymous
anonymous / FallbackGasFunctions.sol
Created June 8, 2016 18:44
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-latest.js&optimize=undefined&gist=
// 21,030
contract Fallback {
uint deposits = 0;
}
// Transaction: 41,143
// Execution: 20,143
contract FallbackDeposit {
uint deposits = 0;
function() {
pragma solidity ^0.4.7;
library convertLib {
function b32toString(bytes32 x) internal returns (string) {
// gas usage: about 1K gas per char.
bytes memory bytesString = new bytes(32);
uint charCount = 0;
@trxcllnt
trxcllnt / curried.sjs
Last active March 18, 2017 13:34
curry and partially apply functions or macros with sweet.js
/*output*//*
var foo = 'd', bar = 'e';
console.log('a', 'b', 'c', foo, bar);
console.log('a', 'b', 'c', foo, 2, 3, 4, 5);
console.log('a', 'c', 'b');
console.log('a', 'd', 'b', 'f', 'e', 'g', foo);
function veryLongFunction() {
console.log.apply(console, arguments);
}
veryLongFunction('a', 'b', 'c', 'd', 'e', 'f');
pragma solidity ^0.4.7;
contract usingCallback {
function __callback(uint id, string s) {}
}
contract A {