Skip to content

Instantly share code, notes, and snippets.

Avatar

Geert-Johan Riemer GeertJohan

View GitHub Profile
View gist:8b4a4e7ef1542241d0c354e22ea71ca2
[axp] send power-off command!
U-Boot SPL 2016.09-dirty (Apr 14 2017 - 15:34:55)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1
U-Boot 2016.09-dirty (Apr 14 2017 - 15:34:55 +0300) Allwinner Technology
View gist:475d7cc37c0d9db616e553db44535c4e
# Copy bootloader
print_with_color "Copying bootloader..."
dd if=$MMC_DEVICE of=$EMMC_DEVICE skip=16 seek=16 count=2032 > /dev/null 2>&1
View main.go
package main
import (
"encoding/csv"
"fmt"
"log"
"net/http"
"os"
"regexp"
"strconv"
View gist:81407ab9316902dd3113
echo '<div class="seeds">';
function humanHashrate($value, $dec = 2) {
$size = array('H/s', 'kH/s', 'MH/s', 'GH/s', 'TH/s', 'PH/s', 'EH/s', 'ZH/s', 'YH/s');
$factor = floor((strlen($value) - 1) / 3);
return sprintf("%.{$dec}f", $value / pow(1024, $factor)) .' '. @$size[$factor];
}
$json = file_get_contents('https://seeds.gulden.com/service/seedsOverview');
$data = json_decode($json, true);
foreach( $data['nodes'] as $node ) {
View gist:ad96c20a2935008b50a6
echo '<div class="seeds">';
function humanHashrate($value, $dec = 2) {
$size = array('H/s', 'kH/s', 'MH/s', 'GH/s', 'TH/s', 'PH/s', 'EH/s', 'ZH/s', 'YH/s');
$factor = floor((strlen($value) - 1) / 3);
return sprintf("%.{$dec}f", $value / pow(1024, $factor)) . @$size[$factor];
}
$json = file_get_contents('https://seeds.gulden.com/service/seedsOverview');
$data = json_decode($json, true);
for( $data['nodes'] as $node ) {
View gist:4c3883b9d165279b30ab
<?php
echo '<div class="seeds">';
$json = file_get_contents('https://seeds.gulden.com/service/seedsOverview');
$data = json_decode($json, true);
for( $data['nodes'] as $node ) {
$versionMajor = round(substr($node['version'], 0, len($node['version'])-6));
$versionMinor = round(substr($node['version'], len($node['version'])-6), len($node['version'])-4));
$versionPatch = round(substr($node['version'], len($node['version'])-4), len($node['version'])-2));
$versionBuild = round(substr($node['version'], len($node['version'])-2), len($node['version'])));
$version = $versionMajor.'.'.$versionMinor.'.'.$versionPatch;
View gist:7c358c0183dab062707f
<?php
echo '<div class="spendings">';
$f = fopen("http://developer.gulden.com/data/expenses.csv", "r");
while( ($line = fgetcsv($f)) !== false ) {
list($date, $description, $amount, $address) = $line;
echo '
<div class="spendings-row">
<div class="spendings-date">'.$date.'</div>
<div class="spendings-description">'.$description.'</div>
View gist:9331795675d66111aea8
--- FAIL: TestTraceStress (1.67s)
trace_test.go:226: failed to parse trace: bogus scanning end (offset 892575, time 28614703)
--- FAIL: TestTraceStressStartStop (0.73s)
trace_test.go:365: failed to parse trace: EvFrequency contains invalid frequency -60703235145 at offset 0x222
--- FAIL: TestTraceFutileWakeup (0.07s)
trace_test.go:433: failed to parse trace: g 186 is not waiting before unpark (offset 481, time 550)
FAIL
FAIL runtime/pprof 9.153s
View gist:7bab8a48b1ecbbb14fbb
[www.kiwiirc.com] `bittrex-richie (1f94dba5@gateway/web/cgi-irc/kiwiirc.com/ip.31.148.219.165)
MaNl is connected via sinisalo.freenode.net (SE)
12:55 <MaNl> hey
12:55 <MaNl> GeertJohan
12:55 <GeertJohan> Hiya
12:56 <MaNl> how is going bro
12:56 <GeertJohan> Yeah, good :)
12:56 <GeertJohan> You?
12:56 <MaNl> we going to pump gulden , are u inside m group
@GeertJohan
GeertJohan / newfile
Last active Aug 29, 2015
.zprezto/modules/prompt/functions/prompt_geertjohan_setup
View newfile
#
# A three-line prompt displaying exit status, location, git info, and more.
#
# Authors:
# Geert-Johan Riemer <geertjohan@geertjohan.net>
#
# Load dependencies.
pmodload 'helper'