I hereby claim:
- I am marz619 on github.
- I am ammaar (https://keybase.io/ammaar) on keybase.
- I have a public key whose fingerprint is 3639 9955 5DB2 0D2E F4E8 E7F3 F2A1 6018 035F 7A86
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# args | |
host=$1 | |
shift | |
prefix=$1 | |
shift | |
# from=$1 | |
# shift | |
# to=$1 |
#!/bin bash | |
# single depth folder | |
for d in `ls -d *(^@)`; do | |
echo $d | |
cd $d | |
branch=`git rev-parse --abbrev-ref HEAD` | |
echo "branch=$branch" | |
if [ "$branch" = "master" ]; then | |
echo "$d - master" |
package aoc | |
import ( | |
"errors" | |
"reflect" | |
) | |
// rotate rotates the values of a slice by rotate positions, preserving the | |
// rotated values by wrapping them around the slice | |
func rotate(slice interface{}, rotate int) error { |
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import print_function | |
import time | |
from multiprocessing import cpu_count | |
from multiprocessing.pool import ThreadPool | |
import requests |
package json | |
import ( | |
"bytes" | |
"encoding/json" | |
"io" | |
) | |
// WriteJSON tries to encode `data` in to the provided io.Writer | |
// |
package main | |
import ( | |
"context" | |
"flag" | |
"log" | |
"math/rand" | |
"os" | |
"os/signal" | |
"sync" |
package stack | |
import ( | |
"reflect" | |
"sync" | |
) | |
// Stack implements Push & Pop | |
type Stack interface { | |
Push(interface{}) |
Using the -ldflags
parameter can help set variable values at compile time.
Using the example provided here:
make build
will create a build
executable. Running it will result in:$> ./build
no version (Mon YYYY)
$>
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
def dird(cls): | |
""" | |
return a generator that yields all methods for `cls` | |
that do not start with underscore (_) | |
""" | |
cn = type(cls).__name__ |