Skip to content

Instantly share code, notes, and snippets.

@jasoncodes
jasoncodes / vim_tips.markdown
Last active December 21, 2015 00:08
Vim Tips

Vim Tips

fresh

Build your dotfiles (shell, Vim config) from multiple sources with fresh.

Both of our dotfiles are built using fresh. We source Vim and other config from each other:

@mwotton
mwotton / stupid axe ad
Created August 3, 2013 23:45
whee, i made their pointless C compile!
typedef struct {
int girlfriend;
} holder;
typedef struct {
holder a;
} toplevel;
typedef struct {
int this;
@floer32
floer32 / centos_cx_Oracle
Last active January 6, 2020 23:29
CentOS 6: Set up Oracle Instant Client and Python package cx_Oracle
#!/bin/bash
# INSTALL ORACLE INSTANT CLIENT #
#################################
# NOTE: Oracle requires at least 1176 MB of swap (or something around there).
# If you are using CentOS in a VMWare VM, there's a good chance that you don't have enough by default.
# If this describes you and you need to add more swap, see the
# "Adding a Swap File to a CentOS System" section, here:
# http://www.techotopia.com/index.php/Adding_and_Managing_CentOS_Swap_Space
@MalucoMarinero
MalucoMarinero / gist:5499229
Last active December 16, 2015 21:21
Early API for a client database abstraction I'm writing, taking cues from the way Django's ORM works.
# Start a new database with name "testDB" and version 20
window.db = new JohoDB "testDB", 20
# Define the database schema, early days so the relations don't do anything yet, but I'm getting there.
db.addSchema 'Household', {
id: {type: "int", primaryKey: true, autoIncrement: true}
address: {type: "string", required: true}
suburb: {type: "string", required: true}
@fergiemcdowall
fergiemcdowall / LevelDBFileReader.js
Last active January 10, 2022 14:56
A Gist to demonstrate writing and reading image files to LevelDB via the node module level up
var levelup = require('levelup')
var fs = require('fs');
var db = levelup('./imagedb')
db.put('name', fs.readFileSync('image.png'), { encoding: 'binary' }, function (err) {
db.get('name', { encoding: 'binary' }, function (err, value) {
fs.writeFile('image-copy.png', value, function (err) {
console.log('image-copy.png saved!');
});
})
@max-mapper
max-mapper / readme.md
Last active December 14, 2015 14:58
js 'pagelet' concept

pagelet

tries to provide a way to use NPM to distribute web components with as little abstraction as possible

  • uses plain index.js, style.css, index.html etc
  • works in multiple environments

example (intentionally verbose)

consider a module called 'simple-button':

@johnbender
johnbender / prefs.js
Created February 23, 2013 06:20
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',
@UweTrottmann
UweTrottmann / install-run-deps.txt
Last active November 24, 2022 21:31
Building and running node-webkit for ARM This is based on the script available at http://code.google.com/p/chromium/wiki/LinuxChromiumArm#Recipe3:_Packaged/Automated_Cross_compiling
=== Relevant links
https://help.ubuntu.com/community/MultiArch
http://unix.stackexchange.com/questions/60282/can-one-install-an-armel-ubuntu-package-on-armhf-ubuntu-system
=== Setup multiarch for armel
Create
'/etc/dpkg/dpkg.cfg.d/multiarch'
containing
'foreign-architecture armel'.
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@carlthewebmaster
carlthewebmaster / .bashrc
Last active December 10, 2015 12:09
shell script to run arch linux on ChromeOS, based on https://gist.github.com/4140706
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Put your fun stuff here.
if uname -a | grep -q SAMSUNG ; then