Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
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
# done by Sebastian Pfitzner | |
function naturalsort(x::Vector{String}) | |
f = text -> all(isnumber, text) ? string(Char(parse(Int, text))) : text | |
sorter = key -> join(f(c) for c in matchall(r"[0-9]+|[^0-9]+", key)) | |
sort(x, by=sorter) | |
end | |
# see https://blog.codinghorror.com/sorting-for-humans-natural-sort-order/ |
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 | |
# Convert all arguments (assumed SVG) to a TIFF acceptable to PLOS | |
# Requires Inkscape and ImageMagick 6.8 (doesn't work with 6.6.9) | |
for i in $@; do | |
BN=$(basename $i .svg) | |
inkscape --without-gui --export-png="$BN.png" --export-dpi 300 $i | |
convert -compress LZW -alpha remove $BN.png $BN.tiff | |
mogrify -alpha off $BN.tiff |
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
class bcolors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' | |
FAIL = '\033[91m' | |
ENDC = '\033[0m' | |
BOLD = '\033[1m' | |
UNDERLINE = '\033[4m' |
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
@show rand(3); | |
# out | |
# rand(3) = [0.867693, 0.141908, 0.0269334] | |
# doesn't show all digits. | |
show(IOContext(STDOUT, :compact=>false), rand(3)); | |
# out | |
# [0.6212121566260771, 0.9149696195383878, 0.6989968224489542] | |
# shows all digits |
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
pkgdirs = filter(d -> isdir(d) && !startswith(basename(d), "."), | |
Pkg.dir.(readdir(Pkg.dir()))); | |
for dir in pkgdirs | |
remote = first(split(readchomp(`git -C $dir remote -vv`), "\n")) | |
if contains(remote, "cossio") | |
println(remote) | |
end | |
end |
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 | |
# $Id: pdf2eps,v 0.01 2005/10/28 00:55:46 Herbert Voss Exp $ | |
# Convert PDF to encapsulated PostScript. | |
# usage: | |
# pdf2eps <page number> <pdf file without ext> | |
pdfcrop $2.pdf | |
pdftops -f $1 -l $1 -eps "$2-crop.pdf" | |
rm "$2-crop.pdf" | |
mv "$2-crop.eps" $2.eps |
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
/** | |
* The onOpen function runs automatically when the Google Docs document is | |
* opened. Use it to add custom menus to Google Docs that allow the user to run | |
* custom scripts. For more information, please consult the following two | |
* resources. | |
* | |
* Extending Google Docs developer guide: | |
* https://developers.google.com/apps-script/guides/docs | |
* | |
* Document service reference documentation: |
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
rsync -avzP source destination |
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 | |
git push origin master |
OlderNewer