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
# gist https://gist.github.com/expertmind/6410029 | |
# Based on https://gist.github.com/isaacbowen/1182136 | |
module WillPaginate | |
module Sinatra | |
module Helpers | |
include ViewHelpers | |
def will_paginate(collection, options = {}) #:nodoc: |
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
;;; | |
;;; ELPA | |
;;; | |
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
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
# Show colors | |
set -g default-terminal "xterm-color" | |
# Allow native scroll back in terminal.app | |
set -ga terminal-overrides 'xterm*:smcup@:rmcup@' |
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
# Tmux/Screen tab title | |
case "$TERM" in | |
screen) | |
PROMPT_COMMAND="printf '\033k$(hostname -s)\033\';"${PROMPT_COMMAND} | |
;; | |
esac |
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 HISTCONTROL=ignoredups:erasedups # no duplicate entries | |
export HISTSIZE=100000 # big big history | |
export HISTFILESIZE=100000 # big big history | |
shopt -s histappend # append to history, don't overwrite it | |
# Save and reload the history after each command finishes | |
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" |
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
#include <SPI.h> | |
#include <Ethernet.h> | |
// Enter a MAC address and IP address for your controller below. | |
// The IP address will be dependent on your local network: | |
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; | |
byte ip[] = { 192, 168, 6, 30 }; | |
byte server[] = { ***, ***, 168, 16 }; // Your VPS |
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
#! /usr/bin/env ruby | |
# -*- Ruby-*- | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
ARGV.concat [ "--readline", | |
"--prompt-mode", | |
"simple" ] | |
# 100 entries in the list |
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
$ sudo apt-get install imagemagick | |
$ sudo apt-get install poppler-utils |
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
// Windows GUI example code | |
#include < windows.h > | |
/* Declare Windows procedure */ | |
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); | |
/* Make the class name into a global variable */ | |
char szClassName[ ] = "WindowsExApp"; |
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
@ECHO OFF | |
@SET PATH= %PATH%;C:appandyourpathhere;D:appandonemore | |
@SET SOMEVARABLE=E:somepath | |
@SET DIRCMD=/D /N | |
@PROMPT $G | |
@ECHO Setting environment for YOURSYSTEM VER | |
@ECHO %TIME% %DATE% | |
@ECHO Namaskar Criss. |
OlderNewer