Skip to content

Instantly share code, notes, and snippets.

View mjuneja's full-sized avatar

Manik Juneja mjuneja

View GitHub Profile
@mjuneja
mjuneja / get_my_access.sh
Created December 14, 2011 15:23
Shell script to get my public key from a url and append to authorized_keys to grant access
#! /bin/bash
if [ ! -d $HOME/.ssh ]; then
`mkdir $HOME/.ssh`
`touch $HOME/.ssh/authorized_keys`
`chmod 0600 $HOME/.ssh/authorized_keys`
else
if [ ! -d $HOME/.ssh/authorized_keys ]; then
echo "Creating authorized_keys file"
`touch $HOME/.ssh/authorized_keys`
`chmod 0600 $HOME/.ssh/authorized_keys`
ActionView::TemplateError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.public_filename) on line #6 of home/_category.html.erb:
3: <%= h(truncate(category.title, 50)) -%>
4: </div>
5: <div class="itemDesc"><%= category.description.blank? ? 'N/A ' : h(truncate(category.description, 50)) -%></div>
6: <%= link_to(image_tag(category.header_image.public_filename(:small)), category, :title => h(category.title)) -%>
7: <div class="view"><%= link_to "View all" + " " + h(truncate(category.title, 50)), category, :title => h(category.title) -%></div>
8: </div>
@mjuneja
mjuneja / create_remote_git_branch.sh
Created September 8, 2008 14:07
creating remote git branch
git push origin origin:refs/heads/new_feature_name
git fetch origin
git branch -r
git checkout --track -b new_feature_name origin/new_feature_name
<p style="margin:0px 0px 0px 20px; color: #6C6C6C; font-weight: bold; font-size: 9pt;">Quote: </p> <div style=" float: relative; margin:0px 20px 0px 20px; padding:10px 10px 10px 10px; background-color:#EBEBEB; border:1px dotted #D1D1D1; font-size: 9pt;" ><em>
YOUR MESSAGE HERE
</em></div>