Skip to content

Instantly share code, notes, and snippets.

View EHER's full-sized avatar
💻

Eher EHER

💻
View GitHub Profile
@EHER
EHER / widget_onde_estou
Created January 5, 2011 15:53
Exibe no mapa o último checkin feito no Apontador
<div id="map_canvas" style="width:710px; height:450px"></div>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
if(location.host == 'eher.com.br') {
consumerKey = "ImpfX7kZ3mPaMHnhOKzY-f-QbFyv0zvoOuJA1sSE_I8~";
} else {
consumerKey = "ImpfX7kZ3mPaMHnhOKzY-QCkBr08iSRfew61TRDxJeo~";
}
$j.getJSON("https://api.apontador.com.br/v1/users/8972911185/visits?callback=?", {
jsconsumerkey : consumerKey,
@EHER
EHER / crowleher.php
Created January 18, 2012 19:49
CrowlEher
<?php
$url = urldecode($_GET['url']);
$original_file = file_get_contents($url);
$stripped_file = strip_tags($original_file, "<a>");
preg_match_all("/<a(?:[^>]*)href=\"([^\"]*)\"(?:[^>]*)>(?:[^<]*)<\/a>/is", $stripped_file, $matches);
echo '<ul>';
foreach($matches[1] as $link) {
echo '<li><a href="?url=' . urlencode($link) . '">'.$link.'</a></li>';
}
PS1='\[\033[38m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]`git branch 2>/dev/null | grep \* | head -1 | sed "s/\* //g" | awk "{ print \"(\"\\\$1 \")\" }"`\n\[\033[29m\]$\[\033[00m\] '
@EHER
EHER / .vimrc
Created January 29, 2012 13:15 — forked from renanivo/.vimrc
" Vundle Baseline {{{
set shell=bash
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
@EHER
EHER / gist:1699319
Created January 29, 2012 15:35
Adding Color to GIT
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
git config --global color.ui auto
#!/bin/sh
PROJECTNAME="$1"
DESTPATH="$2"
GITURL="$3"
VERSION="$4"
git remote add -f $PROJECTNAME $GITURL
git merge -s ours --no-commit $PROJECTNAME/$VERSION
git read-tree --prefix=$DESTPATH -u $PROJECTNAME/$VERSION
#!/bin/sh
./git-merge-subtree.sh phpunit phpunit git://github.com/sebastianbergmann/phpunit.git master
./git-merge-subtree.sh dbunit dbunit git://github.com/sebastianbergmann/dbunit.git master
./git-merge-subtree.sh php-file-iterator php-file-iterator git://github.com/sebastianbergmann/php-file-iterator.git master
./git-merge-subtree.sh php-test-template php-text-template git://github.com/sebastianbergmann/php-text-template.git master
./git-merge-subtree.sh php-code-coverage php-code-coverage git://github.com/sebastianbergmann/php-code-coverage.git master
./git-merge-subtree.sh php-token-stream php-token-stream git://github.com/sebastianbergmann/php-token-stream.git master
./git-merge-subtree.sh php-timer php-timer git://github.com/sebastianbergmann/php-timer.git master
./git-merge-subtree.sh phpunit-mock-objects phpunit-mock-objects git://github.com/sebastianbergmann/phpunit-mock-objects.git master
#!/usr/bin/env php
<?php
$dirPath = __DIR__;
$paths = array(
ini_get("include_path"),
$dirPath . '/vendor/symfony/finder',
$dirPath . '/dbunit',
$dirPath . '/php-file-iterator',
<?php
// vim: foldmethod=marker
/* Generic exception class
*/
class OAuthException extends Exception {
// pass
}
class OAuthConsumer {
@EHER
EHER / .tmux.conf
Created March 11, 2012 01:50
Tmux configuration
unbind %
bind | split-window -h
bind - split-window -v
# mouse
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on