Skip to content

Instantly share code, notes, and snippets.

@nvk
nvk / osx-hack.sh
Last active March 31, 2023 03:48 — forked from erikh/hack.sh
OSX For Hackers & Other fixes
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@nvk
nvk / fast.sh
Created April 7, 2012 19:43 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env bash
##
# Install:
# curl -sL https://raw.github.com/gist/2108403/fast.sh | sh
#
# Share your feedbacks on:
# https://gist.github.com/2108403
#
# Author: @DAddYE (Twitter/Github)
@nvk
nvk / readme
Created April 19, 2012 18:20
Using Git with Dropbox
### Instructions source http://tumblr.intranation.com/post/766290743/using-dropbox-git-repository ####
-- make empty repo on dropbox:
cd ~/Dropbox/RipeApps/Git
mkdir -p newname.git
cd !$
git --bare init
-- push your junk into it
cd ~/Projects/myrepo
@nvk
nvk / howto-filemerge-git-osx.md
Created June 27, 2012 18:40 — forked from bkeating/howto-filemerge-git-osx.md
HOWTO: Using FileMerge (opendiff) with Git on OSX

HOWTO: Using FileMerge (opendiff) with Git on OSX

FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.

The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.

@nvk
nvk / gifu.sh
Created March 9, 2013 16:39
Git I've fucked up, please reset my mess.
# get's branch, fetches origin, resets.
alias gifu='branch=$(git rev-parse --abbrev-ref HEAD) && git fetch origin && git reset --hard origin/$branch'
body{
background:#D8D8D8 url(http://subtlepatterns.com/patterns/brillant.png);
font-family: Helvetica, Arial, sans-serif;
}
.input-field{
border-radius: 2px;
background: #FFFFFF;
border: 1px solid #BDBDBD;
-moz-box-shadow: inset 0px 5px 0px 0 rgba(0,0,0,0.10);
@nvk
nvk / gop-gip.zsh
Last active December 14, 2015 18:39
Open github project and issues page
# Open github project and issues page
# PS: I'm not a dev, I'm sure there is better ways of writing this.
# use at will, by @nvk
gop(){
url=$(git remote -v | perl -n -e 'm{:(.+?).git} && print $1,"\n"' | uniq );
open "http://github.com/$url"
}
gip(){
url=$(git remote -v | perl -n -e 'm{:(.+?).git} && print $1,"\n"' | uniq );
@nvk
nvk / serverhere.zsh
Created April 2, 2013 21:52
server here
serverhere(){
open "http://localhost:8000";
python -m SimpleHTTPServer
}
@nvk
nvk / gifdownloader.zsh
Created April 5, 2013 14:17
gif downloader
#!/bin/bash
curl http://www.onemenny.com/blog/pictures-from-a-developers-life/ | grep .gif | sed 's/^.*src="//g' | sed 's/".*//g'
# wget -i $list
@nvk
nvk / hrline.zsh
Last active December 15, 2015 23:29
hrline() {
# Checks for stout if none gives a default number
if [ -z "$1" ]
then
local length=50
else
local length="$1"
fi