This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ _ _ | |
~ _ __ | | __ _ _ _| | | |
~ | '_ \| |/ _' | || |_| | |
~ | __/|_|\____|\__ (_) | |
~ |_| |__/ | |
~ | |
~ play! 1.2.3, http://www.playframework.org | |
~ | |
~ Ctrl+C to stop | |
~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String camelize(String cmdName, boolean firstUpper = false) { | |
def words = cmdName.split("\\_"); | |
return (firstUpper ? capitalize(words[0]) : words[0]) + words[1..(words.size() -1)].collect({capitalize(it)}).join() | |
} | |
public String capitalize(String a){ | |
String s = a.substring(1) | |
return "${a[0].toUpperCase()}${s.toLowerCase()}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:g/{\n/normal j>i{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Check if process is already running | |
echo "Looking for jenkins" | |
pid=`ps aux | grep jenkins.war | grep -v grep | awk '{print $2}'` | |
echo "PID: $pid" | |
if [ "$pid" == "" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// bookmarklet at https://gist.github.com/1371984 | |
javascript:(function(){ | |
var s=document.createElement("script"); | |
s.src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"; | |
s.onload=function(){ | |
$("ul.actions").map(function(){ | |
var id=$(this).find("a.love").attr("rel"); | |
console.log(id); | |
var button="<li><a rel=\""+id+"\" id=\"unlo-"+id+"\" class=\"unlove badge-vote-down\" href=\"#\"><span>Unlove</span></a></li>"; | |
$(this).append(button); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var%20s=document.createElement("script");s.src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js";s.onload=function(){$("ul.actions").map(function(){var%20id=$(this).find("a.love").attr("rel");console.log(id);var%20button="<li><a%20rel=\""+id+"\"%20id=\"unlo-"+id+"\"%20class=\"unlove%20badge-vote-down\"%20href=\"#\"><span>Unlove</span></a></li>";$(this).append(button);});$("a.unlove").click(function(e){e.preventDefault();var%20id=$(this).attr("rel");$.get("http://9gag.com/vote/dislike/id/"+id,function(){$("#unlo-"+id).addClass("unloved");});});};document.body.appendChild(s);})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s=document.createElement("script"); | |
s.src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"; | |
s.onload=function(){ | |
$("ul.actions").map(function(){ | |
var id=$(this).find("a.love").attr("rel"); | |
console.log(id); | |
var button="<li><a rel=\""+id+"\" id=\"unlo-"+id+"\" class=\"unlove badge-vote-down\" href=\"#\"><span>Unlove</span></a></li>"; | |
$(this).append(button); | |
}); | |
$("a.unlove").click(function (e){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"macro for bookmarkletizise a js | |
let @b='ggOjavascript:(function(){^[G}Go})()^[ggvG1000<:%s/ /%20/g^M:%s/\n//g^M' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#find $1 -type f -print0 | xargs -0 sed -i 's/$2/$3/g' | |
echo $1 $2 $3 | |
grep -rl $2 $1 | while read fn; do | |
echo "replacing in $fn $2 for $3" | |
sed -i "s/$2/$3/g" $fn | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.twttr=window.twttr||{}; | |
var D=550,A=450,C=screen.height,B=screen.width,H=Math.round((B/2)-(D/2)),G=0,F=document,u=encodeURIComponent(F.location.href),t=encodeURIComponent(F.title); | |
if(C>A){ | |
G=Math.round((C/2)-(A/2)) | |
} | |
window.twttr.shareWin=window.open('http://linksdeviernes.com/add.php?url='+u+'&titulo='+t,'','left='+H+',top='+G+',width='+D+',height='+A+',personalbar=0,toolbar=0,scrollbars=1,resizable=1'); |
OlderNewer