Skip to content

Instantly share code, notes, and snippets.

Andreas Brekken abrkn

View GitHub Profile
View gist:8972942
Parse.Cloud.job("testImageCompression", function(request, response) {
console.log("Posting HTTP request");
Parse.Cloud.httpRequest({
method: 'POST',
url: 'https://api.kraken.io/v1/url',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
View depth.jsx
/** @jsx React.DOM */
var ReactWrapper = require('../../../shared/react-wrapper')
, uptodate = require('../../../../helpers/uptodate')
, Side = require('./side')
var Depth = React.createClass({
getInitialState: function() {
return {
depth: api.depth[this.props.market]
}
@abrkn
abrkn / smaller-mixcloud.js
Created Jul 1, 2014
Removes some loading time and load from Mixcloud
View actions_referred.js
var Constants = require('../constants')
exports.query = function() {
this.dispatch(Constants.Referred.QUERY)
api.call('v1/referred')
.then(function(data) {
this.dispatch(Constants.Referred.QUERY_COMPLETED, data)
}.bind(this), function(err) {
this.dispatch(Constants.Referred.QUERY_FAILED, {
View zsh.md

Prereq:

apt-get install zsh
apt-get install git-core

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
@abrkn
abrkn / submit-stellar-transaction.sh
Created Aug 10, 2014
Submit a Stellar transaction from console
View submit-stellar-transaction.sh
/*
{
"method": "submit",
"params": [
{
"tx_json": {
"TransactionType": "Payment",
"Account": "...",
"Destination": "...",
"Amount": "10000000"
@abrkn
abrkn / docker-kill-all.sh
Created Sep 15, 2014
Kill all running docker containers
View docker-kill-all.sh
#!/usr/bin/env bash
docker ps | cut -f1 -d' ' | tail -n+2 | xargs docker kill
@abrkn
abrkn / bitcoind.service
Created Sep 15, 2014
systemd service to run the Bitcoin core daemon
View bitcoind.service
[Unit]
Description=bitcoind
Requires=docker.service
[Service]
WorkingDirectory=/root
TimeoutStartSec=0
# Kill and rm leftover containers
ExecStartPre=-/bin/docker pull abrkn/bitcoind
View bitcoind-backup.service
[Unit]
Description=bitconid Backup
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/bin/docker pull abcrawf/awscli
ExecStartPre=-/bin/docker pull abrkn/bitcoind
View bitcoind-backup.timer
[Unit]
Description=Daily bitcoind Backup
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
You can’t perform that action at this time.