Skip to content

Instantly share code, notes, and snippets.

A - 2.1.2
E-325-DJR-243-BDJ-316-XVX-435-OCN-FJ7-Z2RX
avimerge -o "movie.avi" -i 'movie.cd1.avi' 'movie.cd2.avi'
sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
class PostsController < ApplicationController
def create
@post = Post.new(params[:post])
if @post.save
tweet(@post)
flash[:notice] = 'Post was successfully created.'
redirect_to manage_posts_path
else
render :action => 'new'
body {
font-family: Helvetica,arial,sans-serif;
}
#entryPrint table {
width: 500px;
border: collapse;
border: 1px solid;
}
#entryPrint tr {
%h1 Git Local
- if @config != {}
%p= "Your repository is located at #{@config['path']}"
- end
- if @config == {}
%form{:action => '/create_repo_path', :method => 'post'}
%h2 Set Up Your Server
%p
%label{:for => 'path'} Create a path for your repository:
$('.btn').each(function(){
var b = $(this);
var tt = b.html() || b.val();
if ($(':submit,:button',this)) {
b = $('<a>').insertAfter(this). addClass(this.className).attr('id',this.id);
$(this).remove();
}
b.text('').css({cursor:'pointer'}). prepend('<i></i>').append($('<span>'). html(tt).append('<i></i><span></span>'));
var phone_inputs = $('.phone_input').length ? $('.phone_input') : null;
if (phone_inputs) {
phone_inputs.bind('keyup', function() {
self = $(this);
if (self.val().length == self.attr('maxlength')) {
self.next().focus();
};
})
};
function sticky_clicky(list) {
var lis = list.getElementsByTagName('li');
var i = 0;
do
{
lis[i].style.cursor='pointer';
lis[i].addEventListener('click', color_me, false);
i++;
var last = false;
var color_me = function() {