Skip to content

Instantly share code, notes, and snippets.

View PauloPhagula's full-sized avatar
💭
I'm at BatMan

Paulo Phagula PauloPhagula

💭
I'm at BatMan
View GitHub Profile
@henrik
henrik / .bashrc
Created December 3, 2008 17:56
Git branch and dirty state in Bash prompt.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
# username@Machine ~/dev/dir[master*]$ # dirty working directory
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
@endolith
endolith / Has weird right-to-left characters.txt
Last active July 17, 2024 12:41
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@johngrimes
johngrimes / date.sql
Created May 21, 2010 07:03
MySQL Date Dimension Build Script
/* Adapted from Tom Cunningham's 'Data Warehousing with MySql' (www.meansandends.com/mysql-data-warehouse) */
###### small-numbers table
DROP TABLE IF EXISTS numbers_small;
CREATE TABLE numbers_small (number INT);
INSERT INTO numbers_small VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
###### main numbers table
DROP TABLE IF EXISTS numbers;
CREATE TABLE numbers (number BIGINT);
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@btbytes
btbytes / aal.css
Created June 14, 2010 13:49
Aardward.legs. Sensible typographical defaults.
/*
aardvark.legs by Anatoli Papirovski - http://fecklessmind.com/
Licensed under the MIT license. http://www.opensource.org/licenses/mit-license.php
URL: http://aardvark.fecklessmind.com/aal.css.txt
*/
/*
Reset first. Modified version of Eric Meyer and Paul Chaplin reset
from http://meyerweb.com/eric/tools/css/reset/
*/
@paulirish
paulirish / gist:438326
Created June 14, 2010 21:27
10 things i learned from the jquery source
/*
.d dP"Yb 888888 88 88 88 88b 88 dP""b8 .dP"Y8
.d88 dP Yb 88 88 88 88 88Yb88 dP `" `Ybo."
88 Yb dP 88 888888 88 88 Y88 Yb "88 o.`Y8b
88 YbodP 88 88 88 88 88 Y8 YboodP 8bodP'
//eLite
(function(){
var core = function(e){ //this is the constructor behind the library
var _this = this, i = _this[_length] = e[_length];
//*
if(i===_undefined){
//if no length value, set it to be that thingy
_this[0] = e;
_this[_length] = 1;
}
@napcs
napcs / .vimrc
Last active December 14, 2022 17:40
Set up Vim on Mac, Linux, or Windows. For Mac and Linux: sh <(curl -s https://gist.githubusercontent.com/napcs/532968/raw/vim.sh)
if has('win32') || has ('win64')
let $VIMHOME = $HOME."/Dropbox/dotfiles/.vim"
if !empty($CONEMUBUILD)
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
endif
@scribu
scribu / gist:906872
Created April 7, 2011 01:21
'price' sortable column example
<?php
// Register the column
function price_column_register( $columns ) {
$columns['price'] = __( 'Price', 'my-plugin' );
return $columns;
}
add_filter( 'manage_edit-post_columns', 'price_column_register' );
@mattpodwysocki
mattpodwysocki / gist:1012287
Created June 7, 2011 13:47
Alan Kay on OOP
Dr. Alan Kay explains when "object-oriented" was first used and what it means. [] (Meaning of "Object-Oriented Programming" According to Dr. Alan Kay (meaning of OOP objectoriented definition term notion meaning explanation what is)), document, page 721691
http://www.purl.org/stefan_ram/pub/doc_kay_oop_en (permalink) is the canonical URI of this page.
Stefan Ram
Dr. Alan Kay on the Meaning of “Object-Oriented Programming”
(To link to this page, please use the canonical URI "http://www.purl.org/stefan_ram/pub/doc_kay_oop_en" only, because any other URI is valid only temporarily.)
E-Mail of 2003-07-23
Dr. Alan Kay was so kind as to answer my questions about the term “object-oriented programming”.
Clarification of "object-oriented" [E-Mail]