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
while read line | |
do | |
echo "$line" | |
done < "${1:-/dev/stdin}" |
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
# bash | |
bind '"\el":"ls -lrtha --color=always\n"' | |
bind '"\ef":"find $PWD -type f -iname \"**\""' | |
bind '"\eg":"| xargs grep --delimiter \"\\n\" grep --color=always -ni \"*\""' | |
bind '"\e[1;3D": backward-word' | |
bind '"\e[1;3C": forward-word' | |
bind '"\e[1;3A": history-search-backward' | |
bind '"\e[1;3B": history-search-forward' | |
bind '"\ep":"pwd\n"' | |
bind '"\e4"':yank-last-arg |
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
bindkey -s "^[T" 'sh <<EOF ^[^M'\ | |
'^[^M'\ | |
' # Run the main test.^[^M'\ | |
' cd ~/work/src/tests/ && JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home mvn --quiet test --settings ~/sarnobat.git/mac/.m2/settings.xml -Dsurefire.useFile=false -Dsurefire.printSummary=false -Dtier=devint -Dtest="*#*" | grcat ~/conf.tail ; popd; osascript -e '\''tell app \"System Events\" to display dialog \"Tests finished\"'\'' ^[^M'\ | |
'^[^M'\ | |
'EOF'\ | |
'^[[A^[[A^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D' |
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
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/purl/2.3.1/purl.js"></script> | |
<script> | |
// Get the URL parameter | |
var argName = $.url().param('argName'); | |
// Set the URL parameter | |
if (argName == null) { | |
history.pushState(null, null, '/?argName=defaultValue'); | |
} |
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
System.out.println("\u0024"); |
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 java.io.*; | |
public class StdinLoop { | |
public static void main(String[] args) { | |
BufferedReader br = null; | |
try { | |
br = new BufferedReader(new InputStreamReader(System.in)); | |
String line; | |
while ((line = br.readLine()) != null) { |
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 java.io.*; | |
import com.google.common.collect.HashMultimap; | |
import com.google.common.collect.Multimap; | |
public class Graphml2FileSystemStdin { | |
public static void main(String[] args) { | |
Multimap<String, String> parentToChildren = HashMultimap.create(); |
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
<script | |
src="https://code.jquery.com/jquery-1.9.1.min.js" | |
integrity="sha256-wS9gmOZBqsqWxgIVgA8Y9WcQOa7PgSIX+rPA0VL2rbQ=" | |
crossorigin="anonymous"></script> | |
<script src="https://ndabas.github.io/toc/lib/jquery.toc/jquery.toc.js" type="text/javascript"></script> | |
<ul data-toc data-toc-headings="h2,h3,h4,h5"></ul> |
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
(master version here: https://serverfault.com/questions/351259/is-there-a-good-layout-convention-for-cron-files/1130792#1130792 ) | |
### 0) Header comment | |
General useful comments that will reduce the chance of jobs not working as expected. | |
``` | |
## Characters to escape: %, $ | |
``` |