Skip to content

Instantly share code, notes, and snippets.

View Sacret's full-sized avatar
:octocat:
Working from home

Anastasia A. Sacret

:octocat:
Working from home
View GitHub Profile
@r00k
r00k / vimrc
Last active May 13, 2023 09:34
A minimal vimrc for beginners
" A minimal vimrc for new vim users to start with.
"
" Referenced here: http://www.benorenstein.com/blog/your-first-vimrc-should-be-nearly-empty/
" Original Author: Bram Moolenaar <Bram@vim.org>
" Made more minimal by: Ben Orenstein
" Last change: 2012 Jan 20
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
@mjackson
mjackson / FirebaseStateMixin.js
Last active February 5, 2016 11:34
A simple mixin for React components that need to bind state to a Firebase ref
var Firebase = require('firebase');
var baseRef = new Firebase('https://my-firebase.firebaseio.com');
function getSnapshotValue(snapshot) {
return snapshot.val();
}
/**
* A mixin for components that want to bind the value of a state variable
* to the value at a Firebase ref.
@rodleviton
rodleviton / imagemagick-install-steps
Created May 26, 2014 07:37
Installing Image Magick on Ubuntu 14.04
sudo -i
cd
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
wget http://www.imagemagick.org/download/ImageMagick-6.8.7-7.tar.gz
tar xzvf ImageMagick-6.8.9-1.tar.gz
cd ImageMagick-6.8.9-1/
./configure --prefix=/opt/imagemagick-6.8 && make
checkinstall
@n1k0
n1k0 / location.js
Created July 4, 2012 08:46
PhantomJS test script for window.location
var page = require('webpage').create();
var base = phantom.args[0];
var path = phantom.args[1];
var expected = phantom.args[2];
page.onNavigationRequested = function(url, navigationType, navigationLocked, isMainFrame) {
console.log('Navigation requested: ' + navigationType + '; ' + url);
if (!page.testStarted) {
return;
}