Skip to content

Instantly share code, notes, and snippets.

View sdbondi's full-sized avatar

Stan Bondi sdbondi

View GitHub Profile
@sdbondi
sdbondi / install_rbenv.sh
Last active August 29, 2015 14:06
Install our development ruby environment
#!/usr/bin/env bash
set -eo pipefail
# Install rbenv
if [[ ! -d ~/.rbenv ]]; then
echo "Installing rbenv"
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
if [[ ! `grep 'eval "\$(rbenv init -)"' ~/.bashrc` ]]; then
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
@sdbondi
sdbondi / install_wkhtmltoimage.sh
Last active December 3, 2015 08:57
Install wkhtmltoimage
#!/usr/bin/env bash
set -eo pipefail
DEPS='openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig'
echo $DEPS | xargs apt-get -y install
rm -f /tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb -P /tmp
dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
@sdbondi
sdbondi / codeship_elasticbeanstalk.sh
Last active August 29, 2015 14:21
Codeship deploy script for elasticbeanstalk
#!/bin/bash
set -e
echo "---> Installing aws cli (if neccessary)"
type aws 1>/dev/null 2>&1 || pip install awscli
echo "---> Packaging app"
apiVersion: v1
kind: ReplicationController
metadata:
name: drone-agent
namespace: app-support
labels:
tier: support
spec:
replicas: 2
selector:
@sdbondi
sdbondi / docker-vars.py
Created June 22, 2017 11:01
Use JQ to parse environment variables from docker container and then transform them into arguments to be passing into the docker run command.
#!/usr/bin/env python
import argparse
import json
from subprocess import check_output
def inspect(container):
return json.loads(check_output(["docker", "inspect", container]))
def prep_arg(string):
@sdbondi
sdbondi / sendwithus - yeartag
Created June 28, 2017 11:33
Sendwithus current year format tag
{{ iso_date|iso8601_to_time|datetimeformat('%Y') }}
[2017-07-31 18:21:14] __rvm_make
__rvm_make ()
{
\make "$@" || return $?
}
current path: /home/stan/.rvm/src/ruby-2.3.4
PATH=/home/stan/.rvm/usr/bin:/home/stan/.rbenv/shims:/home/stan/.rbenv/bin:/home/stan/bin:/home/stan/.local/bin:/home/stan/.bin/google-cloud-sdk/bin:/home/stan/.git-subrepo/lib:/home/stan/.nvm/versions/node/v6.3.1/bin:/home/stan/.bin/jdk1.8.0_77/bin:/home/stan/bin:/home/stan/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/stan/.rvm/bin:/home/stan/.bin:/home/stan/.npm/bin:/home/stan/.n/bin:/home/stan/applications/Android/android-studio/bin:/home/stan/applications/Android/Sdk/platform-tools:/home/stan/applications/Android/Sdk/tools:/usr/local/go/bin:/bin:/usr/local/android-studio/bin:/home/stan/.bin:/home/stan/.bin
command(2): __rvm_make -j8
++ make -j8
CC = gcc
import {put, call, select} from 'redux-saga/effects';
import {takeEvery} from 'redux-saga';
import feathers from '../feathers';
import createResourceActionCreators from '../actions/resource';
import {resource as resourceActions} from '../actions';
import resourceEndpoints from './endpoints';
const initialOptions = {
pagination: {perPage: 10, page: 1},

Keybase proof

I hereby claim:

  • I am sdbondi on github.
  • I am stanimal (https://keybase.io/stanimal) on keybase.
  • I have a public key ASDT83RI6sEvIDkVS5fyGYBTjkch9xlt97JC3zAKgRJwDAo

To claim this, I am signing this object:

@sdbondi
sdbondi / async_job_future.rs
Last active January 14, 2019 05:51
First attempt at a future with a call back which runs in it's own thread (Does not compile)
use futures::{Future, Poll, task, Async};
use std::sync::Arc;
use std::sync::mpsc;
use std::sync::mpsc::{Sender, Receiver};
use std::error::Error;
use std::thread;
use std::marker::{Send, Sync};
use std::sync::Mutex;
///