Skip to content

Instantly share code, notes, and snippets.

View abrkn's full-sized avatar

Andreas Brekken abrkn

View GitHub Profile
@abrkn
abrkn / gist:8972942
Last active August 29, 2015 13:56 — forked from heumn/gist:8955387
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({
/** @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 July 1, 2014 07:15
Removes some loading time and load from Mixcloud
placeholder
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, {
@abrkn
abrkn / zsh.md
Created August 7, 2014 11:15 — forked from tsabat/zsh.md
@abrkn
abrkn / submit-stellar-transaction.sh
Created August 10, 2014 15:04
Submit a Stellar transaction from console
/*
{
"method": "submit",
"params": [
{
"tx_json": {
"TransactionType": "Payment",
"Account": "...",
"Destination": "...",
"Amount": "10000000"
@abrkn
abrkn / docker-kill-all.sh
Created September 15, 2014 08:44
Kill all running docker containers
#!/usr/bin/env bash
docker ps | cut -f1 -d' ' | tail -n+2 | xargs docker kill
@abrkn
abrkn / bitcoind.service
Created September 15, 2014 14:13
systemd service to run the Bitcoin core daemon
[Unit]
Description=bitcoind
Requires=docker.service
[Service]
WorkingDirectory=/root
TimeoutStartSec=0
# Kill and rm leftover containers
ExecStartPre=-/bin/docker pull abrkn/bitcoind
[Unit]
Description=Daily bitcoind Backup
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
[Unit]
Description=bitconid Backup
Requires=docker.service
[Service]
TimeoutStartSec=0
ExecStartPre=-/bin/docker pull abcrawf/awscli
ExecStartPre=-/bin/docker pull abrkn/bitcoind