task name {
String in
command {
echo '${in}'
}
output {
String out = read_string(stdout())
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 strformat | |
import tables | |
# A small program to make using 256 colors in Nim less painful. | |
# Original ZSH version from: | |
# P.C. Shyamshankar <sykora@lucentbeing.com> | |
# Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ | |
# Nim rewrite by Laszlo Szathmary <jabba.laci@gmail.com> | |
# thanks to narimiran and kickeroo for making the code more idiomatic Nim code |
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 | |
declare -a arr=("echo 'hi'" "echo 'hello'") | |
for (( i = 0; i < ${#arr[@]} ; i++ )); do | |
printf "\n**** Running: ${arr[$i]} *****\n\n" | |
# Run each command in array | |
eval "${arr[$i]}" | |
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
#!/usr/bin/python | |
from __future__ import print_function | |
# from https://wiki.python.org/moin/SortingListsOfDictionaries | |
def multikeysort(items, columns): | |
from operator import itemgetter | |
comparers = [ ((itemgetter(col[1:].strip()), -1) if col.startswith('-') else (itemgetter(col.strip()), 1)) for col in columns] | |
def comparer(left, right): | |
for fn, mult in comparers: |
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
.PHONY: init-project repl deps | |
#https://stackoverflow.com/a/23324703 (gets the absolute directory of the Makefile) | |
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | |
QUICKLISP_DIR := $(ROOT_DIR)/quicklisp | |
UTILS_DIR := $(QUICKLISP_DIR)/utils | |
SBCL := $(HOME)/sw/cl/sbcl/2.0.3/bin/sbcl | |
SWANK_HOST := "127.0.0.1" |
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
{ | |
"comment": "If you've gotten here by mistake, this is the JSON data used by our pricing calculator. It is helpful for developers. Go to https://cloud.google.com/products/calculator/ to get back to our web calculator.", | |
"version": "v1.13", | |
"updated": "01-August-2017", | |
"gcp_price_list": { | |
"sustained_use_base": 0.25, | |
"sustained_use_tiers": { | |
"0.25": 1.0, | |
"0.50": 0.8, | |
"0.75": 0.6, |
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 python | |
# Based on: https://github.com/piedar/pychromecast/blob/cast/cast.py | |
# https://github.com/balloob/pychromecast/issues/8 | |
# https://github.com/balloob/pychromecast/issues/154 | |
# https://en.wikipedia.org/wiki/Multicast_DNS | |
# Copyright 2015 Benn Snyder <benn.snyder@gmail.com> | |
# Released under MIT license | |
# |
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 csi -ss | |
;; An example file reading script with chicken scheme | |
(use extras) | |
(define (read-it file) | |
(let ((fh (open-input-file file))) | |
(let loop((c (read-line fh))) | |
(if (eof-object? c) |
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
/* | |
This is a go program to download pictures from a tumblr blog page. | |
To Build: | |
go build -o tumblr-download tumblr-download.go | |
To Run: | |
# download the photos on the first page of tumblr blog |