Skip to content

Instantly share code, notes, and snippets.

View aeneasr's full-sized avatar
💭
I may be slow to respond.

hackerman aeneasr

💭
I may be slow to respond.
View GitHub Profile
package main
import (
"fmt"
"log"
"net/http"
"net/http/cookiejar"
"time"
)
package main
import (
"fmt"
"log"
"net/http"
"net/http/cookiejar"
"os"
"time"
{
"consumes": [
"application/json",
"application/x-www-form-urlencoded"
],
"produces": [
"application/json"
],
"schemes": [
"http",
@aeneasr
aeneasr / themeforest-analysis.js
Created August 31, 2017 10:29
Estimating themeforest sales per category
var vals = [];
[].forEach.call(document.querySelectorAll('.product-list__column-price'), function(e) { vals.push({price: parseInt(e.querySelector('.product-list__price-desktop').textContent.replace('$', '')), sales: parseInt(e.querySelector('.product-list__sales-desktop').textContent.replace(' Sales', ''))}) })
console.log(vals)
export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=~/workspaces/go
export PATH=$GOPATH/bin:$PATH
func runReleaseAddDocker(args *docopt.Args, client *controller.Client) error {
release := &ct.Release{}
if args.String["--file"] != "" {
data, err := ioutil.ReadFile(args.String["--file"])
if err != nil {
return err
}
if err := json.Unmarshal(data, release); err != nil {
return err
}
# du -s * | sort -n
4 10bfd220cf5966b788612ea7a5d6238e56cdc8935ffba3447849dbeb34636725
4 184af8860f22e7a87f1416bb12a32b20d0d2c142f719653d87809a6122b04663
4 216d9a0e82646f77b31b78eeb0e26db5500930bbd6085d5d5c3844ec27c0ca50
4 2983b4213660c79d847558fc96b5306c51ed5af616ed76b9b86ae6227e63c359
4 39d4e1bd71bf3213fd59d23a56796fffd7c21e6d633dcbe572024d53bcac9bb4
4 3f5620a3fe71ca015f4af8928fb5d16d401d179d1a374e96d17e7eb838576d53
4 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158
4 56180451433eae67c3334edfd2782ae16daf321585c4e90119853511ca9ca58f
4 5ebbfc70e07910a092f18f505c43ab9f6c03e1d8c177cc866e3fb87a41b0b49c
newfstatat(6, "12030", {st_mode=S_IFREG|0600, st_size=8192, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "11971", {st_mode=S_IFREG|0600, st_size=24576, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "11995", {st_mode=S_IFREG|0600, st_size=16384, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "12137", {st_mode=S_IFREG|0600, st_size=8192, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "12140", {st_mode=S_IFREG|0600, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "11995_vm", {st_mode=S_IFREG|0600, st_size=8192, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "12076_vm", {st_mode=S_IFREG|0600, st_size=8192, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "11934", {st_mode=S_IFREG|0600, st_size=65536, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "11943", {st_mode=S_IFREG|0600, st_size=8192, ...}, AT_SYMLINK_NOFOLLOW) = 0
newfstatat(6, "12002", {st_mode=S_IFREG|0600, st_size=16384, ...}, AT_SYMLINK_NOFOLLOW) = 0
# strace find
execve("/usr/bin/find", ["find"], [/* 20 vars */]) = 0
brk(0) = 0x1fc6000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f292a2b0000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=30482, ...}) = 0
mmap(NULL, 30482, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f292a2a8000
close(3) = 0
root@ip-10-0-2-249:/var/lib/flynn/volumes/zfs/mnt# zfs get all
NAME PROPERTY VALUE SOURCE
flynn-default type filesystem -
flynn-default creation Mon May 18 11:48 2015 -
flynn-default used 13.0G -
flynn-default available 20.7G -
flynn-default referenced 19K -
flynn-default compressratio 1.00x