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
# do not bell on tab-completion | |
#set bell-style none | |
set meta-flag on | |
set input-meta on | |
set convert-meta off | |
set output-meta on | |
$if mode=emacs |
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
testCtrl.$inject = ['$scope']; | |
function testCtrl($scope) { | |
$scope.foo = function() { | |
console.log(arguments); | |
} | |
} | |
testDirective.$inject = ['$parse']; | |
function testDirective($parse) { | |
var directive = { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0"> | |
<channel> | |
<title>Хабрахабр / Тематические хабы / Захабренные</title> | |
<link>http://habrahabr.ru/rss/hubs/</link> | |
<description><![CDATA[Захабренные посты из тематических хабов на Хабрахабре]]></description> | |
<language>ru</language> | |
<managingEditor>[email protected]</managingEditor> | |
<generator>habrahabr.ru</generator> | |
<pubDate>Mon, 21 May 2012 21:23:07 GMT</pubDate> |
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 | |
function filter_ignored_branches() { | |
local branches=$1 | |
local ignored=$2 | |
local result="" | |
for branch in $branches; do | |
if echo $ignored | grep -v $branch > /dev/null ; then | |
if [ "$INVERT" != "true" ]; then | |
result="$result $branch" | |
fi |
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 | |
set -e | |
git pull origin master | |
BRANCHES="" | |
for branch in $(git branch -r); do | |
if git log ${branch}^..${branch} | grep "$1" > /dev/null ; then | |
branch=$(echo $branch | sed s/.*\\///) | |
BRANCHES="$BRANCHES $branch" | |
fi | |
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
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(1337, "127.0.0.1"); | |
console.log('Server running at http://127.0.0.1:1337/'); |
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
apply plugin: "java" | |
apply plugin: "eclipse" | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile ( | |
"org.jboss.netty:netty:latest.integration", |
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
(function() { | |
try { | |
prettyPrint(); | |
} catch(e) { | |
var scriptId = 'prettyPrinter'; | |
if (document.getElementById(scriptId) === null) { | |
var elem = document.createElement('SCRIPT'); | |
elem.id = scriptId; | |
elem.onload = function() { | |
prettyPrint(); |
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
import org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext | |
apply plugin: "jetty" | |
def newResourceCollection(File... resources) { | |
shell = new GroovyShell(JettyPluginWebAppContext.class.classLoader) | |
shell.setProperty("resources", resources as String[]) | |
return shell.evaluate(file("resource_collection.groovy")) | |
} |
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
import com.google.inject.*; | |
import com.google.inject.name.Named; | |
import com.google.inject.name.Names; | |
import com.google.inject.servlet.SessionScoped; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.Callable; | |
/** |
NewerOlder