Skip to content

Instantly share code, notes, and snippets.

View thomasbilk's full-sized avatar
💭
Git is for gits

Thomas Bilk thomasbilk

💭
Git is for gits
View GitHub Profile
@thomasbilk
thomasbilk / fossil_rss.sh
Created July 31, 2014 18:39
Bash Script for generating RSS files for all Fossil repositories in a folder
#!/usr/bin/env bash
for fos in `ls /var/repos/*.fossil`; do
rss=`echo $fos | sed 's/\/var\/repos\/\(.*\)\.fossil/\1/'`;
/usr/local/bin/fossil rss -R $fos --url https://repos.com/$rss > /var/public/rss/$rss.rss;
done
@thomasbilk
thomasbilk / howto.md
Last active June 29, 2017 09:35
How to build a jruby jar with sass libs

Download jruby complete:

curl -O http://jruby.org.s3.amazonaws.com/downloads/1.7.13/jruby-complete-1.7.13.jar

Now rename it:

mv jruby-complete-1.7.13.jar scss.jar

Next install gems:

@thomasbilk
thomasbilk / mandelbrot.sql
Last active August 29, 2015 14:25 — forked from rupey/mandelbrot.sql
Mandelbrot plot in postgres
WITH RECURSIVE
x(i) AS ( VALUES (0)
UNION ALL SELECT i + 1
FROM x
WHERE i < 101),
Z(Ix, Iy, Cx, Cy, X, Y, I) AS (
SELECT
Ix,
Iy,
X :: FLOAT,
@thomasbilk
thomasbilk / vault_decrypt
Last active June 8, 2017 15:53 — forked from leucos/clean_vault
Ansible vault transparent encryption revisited
#!/bin/sh
tmp=`mktemp`
cat "${1--}" > $tmp
ansible-vault decrypt $tmp > /dev/null 2>&1
if [ $? -eq 0 ]; then
cat "$tmp"
else
cat "${1--}"