Skip to content

Instantly share code, notes, and snippets.

View aurium's full-sized avatar
🤔
hummmm

Aurélio A. Heckert aurium

🤔
hummmm
View GitHub Profile
@aurium
aurium / update-node.sh
Created July 8, 2016 14:41
Update Node.js installation
#!/bin/bash -e
cd $(dirname $0)
fileNameRE='node-v[0-9.]+-linux-x64\.tar\.gz'
newestFileName=$(wget https://nodejs.org/dist/latest/ -O - | sed 's/</\n</g' | egrep "$fileNameRE" | sed -r "s/.*\"($fileNameRE)\".*/\1/")
newestVersion=$( echo -n $newestFileName | sed -r 's/node-v([0-9.]+)-.*/\1/' )
currentDirName=$( ls -1 | grep '^node-' | head -n1 )
currentVersion=$( echo -n $currentDirName | sed -r 's/node-v([0-9.]+)-.*/\1/' )
@aurium
aurium / build-epub.coffee
Created January 31, 2016 22:36
Build 12factor Epub
# Run inside 12factor root-dir from https://github.com/heroku/12factor
# Will build Pt-BR e-ebook
Epub = require 'epub-gen'
marked = require 'marked'
fs = require 'fs'
chapters = [
'who'
'intro'
@aurium
aurium / piped.js
Created October 5, 2015 20:44
Piped Class -- Chaining proposal to shelljs
var fs = require('fs');
var child_process = require('child_process');
function __joinStderr(current, plus) {
if ( !current || current==='' ) return plus.toString();
return current + '\n' + plus.toString();
}
function Piped(cmdName, stdout, stderr, options) {
this.__cmdName = cmdName;
@aurium
aurium / loader.js
Last active August 29, 2015 14:04
js13kGames entry server loader
/* Go to: https://github.com/aurium/js-game-server */
@aurium
aurium / loomio-notify
Last active February 7, 2016 17:12
Script to notify you when a event happens on http://loomio.org with picture, description and link for quick access.
#!/bin/bash
app_title='Loomio Notify'
conf_dir="$HOME/.config/$(basename $0)"
pics="$conf_dir/pics"
mkdir -p "$pics"
html="$conf_dir/items.html"
cookie="$conf_dir/cookie.txt"
last_dropdown_item="$conf_dir/last-dropdown-item.txt"
last_inbox_items="$conf_dir/last-inbox-items.txt"
@aurium
aurium / index.html
Last active December 20, 2015 17:39
Display Topics
<!DOCTYPE html>
<html lang="pt">
<head>
<meta charset="utf-8" />
<title>Tópicos</title>
<link href="style.css" rel="stylesheet" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>