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
#!/usr/bin/env python3 | |
import tatsu | |
import json | |
from pprint import pprint | |
GRAMMAR = """@@grammar::ZQUERY | |
start = expression $ ; |
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
object KLSigPipeFun { | |
def main(args: Array[String]) = { | |
val lines = scala.io.Source.stdin.getLines() | |
val lineNumbers = 1 to Int.MaxValue | |
val numberedLines = lineNumbers.zip(lines) | |
val okLines = numberedLines takeWhile { _ => !scala.sys.process.stdout.checkError() } | |
val outLines = okLines map { case (number, line) => println(number + ":" + line) } | |
println(outLines.length + " lines counted") | |
} | |
} |
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
ctags --output-format=json --fields="+n-P" rational.c |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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=$0 | |
function get_line_self() { | |
local FILENAME=$1 | |
local LN=$(($2 - 1)) | |
local INFO=( $(sed "${LN}q;d" $FILENAME) ) | |
echo ${INFO[0]} | |
} | |
### Comment |
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
#!/usr/bin/env python3 | |
# requires PyYAML & python-frontmatter | |
# pip install PyYAML | |
# pip install python-frontmatter | |
import frontmatter | |
import sys | |
import yaml |
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
#!/usr/bin/env amm | |
import $ivy.`com.chuusai::shapeless:2.4.0-M1` | |
import shapeless._ | |
println(scala.util.Properties.versionNumberString) | |
println(1 :: "lol" :: List(1, 2, 3) :: HNil) | |
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
#!/usr/bin/env amm | |
import $ivy.`com.chuusai::shapeless:2.4.0-M1` | |
import shapeless._ | |
println(scala.util.Properties.versionNumberString) | |
println(1 :: "lol" :: List(1, 2, 3) :: HNil) | |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/gkt/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
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
set editing-mode vi | |
NewerOlder