Skip to content

Instantly share code, notes, and snippets.

"system clipboard
set guioptions=aA
"paste indent fix toggle
nnoremap <F3> :set invpaste paste?<CR>
set showmode
set pastetoggle=<F3>
"pathogen runtime
source ~/.vim/bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
<<<<<<< HEAD
<!-- Yii seems to be including jquery automagically - we don't need this line
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.js" type="text/javascript"></script>
-->
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.ui.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.tag.it.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.tools.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.select.box.js" type="text/javascript"></script>
=======
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/admin.scripts.min.js" type="text/javascript"></script>
@seeRead
seeRead / git-branch-up
Created January 13, 2012 19:17
One line is better than four
#!/bin/bash
set -e
usage()
{
echo "usage: `basename ${0}` [-h]
This script creates a new branch and sets upstream to origin. Specify the branch name as the first and only argument.
" >&2
exit $1
}
git branch $1
int pins[] = {11, 10, 9}; // R, G, B
int pinCnt = sizeof(pins) / sizeof(pins[0]);
String mode = "not test"; //set to test to debug
String mesg = "Pin ";
void setup()
{
Serial.begin(9600);
if (mode == "test") {
for (int i=0; i < pinCnt; i++){
pinMode(pins[i], OUTPUT); // set pin modes
int pins[] = {11, 10, 9}; // R, G, B
int pinCnt = sizeof(pins) / sizeof(pins[0]);
String mode = "not test"; //set to test to debug
String mesg = "Pin ";
void ledDown(int pin, int lag){
Serial.println(mesg + pin + " going down");
for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) {
analogWrite(pin, fadeValue);
delay(lag);
}
@seeRead
seeRead / md.rb
Created April 1, 2012 21:24
github flavored markdown preview script
#!/usr/bin/env ruby
raise "gimme a file!" unless ARGV[0]
# This script allows for quick github-flavored-markdown previewing.
# Inspiration/code from the following
# http://grosser.it/2009/06/17/quick-markdown-preview-for-github-readme/
# https://gist.github.com/1300939
# https://github.com/alampros/Docter
# http://blog.steveklabnik.com/posts/2011-12-21-redcarpet-is-awesome
#
# You will need the following gems:
@seeRead
seeRead / .irbrc
Created April 28, 2012 21:49
IRB setup
# Interactive Ruby console configuration
# use x = _ to assign to last output
# use 'method' to determine where a method is defined
# e.g. User.method(:acts_as_commentable)
IRB_START_TIME = Time.now
# Print to yaml format with "y"
require 'yaml'
# Pretty printing
require 'pp'
#!/bin/bash
# boot_enhancer.sh
# also see Bootchart http://www.bootchart.org/
# source http://www.ubuntubuzz.com/2012/01/how-to-increasespeed-up-ubuntu-booting.html
first_half()
{
sudo apt-get -y install prelink # http://ubuntuforums.org/showthread.php?t=832615
sudo /etc/cron.daily/prelink
sudo apt-get -y install preload # http://ubuntuforums.org/showthread.php?t=832615
sudo sed -i 's/PRELINKING\=unknown/PRELINKING\=yes/g' /etc/default/prelink
@seeRead
seeRead / xorg.conf
Created June 30, 2012 21:15
my weekend's pride
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 302.17 (buildd@rhenium) Sun Jun 17 23:26:33 UTC 2012
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection