Skip to content

Instantly share code, notes, and snippets.

View mishin's full-sized avatar
💭
if you fail to prepare you prepare to fail

Nikolay Mishin mishin

💭
if you fail to prepare you prepare to fail
View GitHub Profile
@yannk
yannk / .bashrc.sh
Created January 25, 2009 18:05 — forked from henrik/.bashrc
[plumbing] bash prompt integrating gist
# add in your .bashrc
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# http://blog.cyberion.net/2009/01/improved-bash-prompt-for-git-usage.html
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master⚡]$ # dirty working directory
#
# I've made the following ajustements:
# - Use of plumbing, that should be faster than git status porcelain.
# - Don't show my repo as dirty if it has files unknown from the index (I always have).
$ pwd
/tmp
$ git clone git://github.com/viklund/november.git
$ git clone git://github.com/masak/html-template.git
$ export RAKUDO_DIR=$PARROT_DIR/languages/rakudo
$ export PERL6LIB=$RAKUDO_DIR:/tmp/november/lib:/tmp/html-template/lib
$ cd html-template/
$ perl Makefile.PL
$ make
$ cd ../november/
=pod
=head1 NAME
Moose::Manual::Contributing - How to get involved in Moose
=head1 GETTING INVOLVED
Moose is a pretty open project and we are always willing to accept bug fixes,
more tests and documentation patches. Commit bits are given out freely, and
# install perlbrew
curl -O -L http://xrl.us/perlbrew
perl perlbrew install
rm perlbrew
# setup perlbrew
~/perl5/perlbrew/bin/perlbrew init
echo "source $HOME/perl5/perlbrew/etc/bashrc" >> ~/.bashrc
# restart your shell
@Htbaa
Htbaa / .perltidyrc
Created July 21, 2010 12:13
.perltidyrc
# Perl Best Practices (plus errata) .perltidyrc file
-l=98 # Max line width is 98 cols
-i=4 # Indent level is 4 cols
-ci=4 # Continuation indent is 4 cols
#-st # Output to STDOUT
-se # Errors to STDERR
-vt=2 # Maximal vertical tightness
-cti=0 # No extra indentation for closing brackets
-pt=1 # Medium parenthesis tightness
-bt=1 # Medium brace tightness
import logging
import timeit
logger = logging.getLogger(__name__)
def log_noop():
pass
def log_simple():
logger.info("Testing")
#!/bin/bash
#
# PS1 magic
#
# Mostly copied from YUVAL KOGMAN version, added my own __git_ps1 stuff
# Original: http://gist.github.com/621452
#
# See video demo of this at http://vimeo.com/15789794
#
# To enable save as .bash_prompt in $HOME and add to .bashrc:
@Htbaa
Htbaa / .gvimrc
Last active February 13, 2025 13:05
.gvimrc
" NOTE: a separate .vimrc is required for vim-plug: https://gist.github.com/Htbaa/b3c8d46db8936ad69c4c9bf46e55b51b
" Many thanks to https://raw.github.com/nvie/vimrc/master/vimrc
" http://nvie.com/posts/how-i-boosted-my-vim/
"set guifont="Droid Sans Mono:h10:b:cANSI"
"set guifont=Consolas:h10:b:cANSI
set number " always show line numbers
set smartindent
set hlsearch " highlight search terms
@fcalderan
fcalderan / inception-javascript.js
Created November 2, 2010 09:42
inception explained as a 4 nested javascript closures
/*
* Fabrizio Calderan, twitter @fcalderan, 2010.11.02
* I had an idea: could Inception movie be explained by a few javascript closures
* and variable resolution scope (just for fun)?
*
* Activate javascript console =)
*/
<script>
console.group("inception movie");
@jl2
jl2 / gtrans.pl
Created March 30, 2011 19:48
Perl command line interface to Google Translate.
#!/usr/bin/perl
# By: Jeremiah LaRocco
# Use translate.google.com to translate between languages.
# Sample run:
# gtrans.pl --to french --from english This is a test
# Ceci est un test
#
use strict;