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
# Aliases in this file are bash and zsh compatible | |
# Don't change. The following determines where YADR is installed. | |
yadr=$HOME/.yadr | |
alias .='pwd' | |
# Get operating system | |
platform='unknown' | |
unamestr=$(uname) | |
if [[ $unamestr == 'Linux' ]]; then | |
platform='linux' |
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
module ApplicationHelper | |
def gravatar_for(user, opts = {}) | |
opts[:alt] = user.name | |
image_tag "https://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(user.email)}?s=#{opts.delete(:size) { 40 }}", | |
opts | |
end | |
end |
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
" Vim functions to run RSpec and Cucumber on the current file and optionally on | |
" the spec/scenario under the cursor. | |
function! RailsScriptIfExists(name) | |
" Bundle exec | |
if isdirectory(".bundle") || (exists("b:rails_root") && isdirectory(b:rails_root . "/.bundle")) | |
return "bundle exec " . a:name | |
" System Binary | |
else | |
return a:name |
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
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |
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
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
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
// ==ClosureCompiler== | |
// @compilation_level ADVANCED_OPTIMIZATIONS | |
// @output_file_name gestalt-min.js | |
// ==/ClosureCompiler== | |
(function(window, document, jq, undefined) { | |
jq.queryParams = function( defaults ) { | |
var ary = window.location.search.substr(1).split('&'), | |
obj = {}, |
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
CFLAGS=-Wall -g | |
all: ex19 | |
ex19: object.o | |
clean: | |
rm -f ex19 | |
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 | |
# encoding: utf-8 | |
require 'set' | |
require 'yaml' | |
class Dockerfile | |
def initialize | |
@from = "ubuntu:latest" |
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
#!/bin/sh | |
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common | |
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev | |
sudo mkdir /usr/include/lua5.1/include | |
sudo ln -s /usr/include/luajit-2.0 /usr/include/lua5.1/include | |
cd ~ | |
git clone https://github.com/vim/vim.git |
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
var express = require('express'); | |
var bcrypt = require('bcrypt-nodejs'); | |
var router = express.Router(); | |
var mongoose = require('mongoose'); | |
var Page = require('../models/page.js'); | |
var adminUser = require('../models/admin-users.js'); | |
// Session Checking Code | |
function sessionCheck(request, response, next) { |
NewerOlder