Skip to content

Instantly share code, notes, and snippets.

View bubunyo's full-sized avatar
😐
Transitioning

Bubunyo Nyavor bubunyo

😐
Transitioning
View GitHub Profile
@bubunyo
bubunyo / .elasticbeanstalk_config.yml
Created November 3, 2017 10:40 — forked from diverted247/.elasticbeanstalk_config.yml
AWS EB - Golang Binary Server Deployment
branch-defaults:
default:
environment: test
group_suffix: null
global:
application_name: test
default_platform: Go 1.4
default_region: us-west-2
@bubunyo
bubunyo / loadgtfs.cql
Created October 6, 2016 19:25 — forked from rvanbruggen/loadgtfs.cql
Loading and Querying GTFS data
//LOAD CSV script for GFTS data
create constraint on (a:Agency) assert a.id is unique;
create constraint on (r:Route) assert r.id is unique;
create constraint on (t:Trip) assert t.id is unique;
create index on :Trip(service_id);
create constraint on (s:Stop) assert s.id is unique;
create index on :Stoptime(stop_sequence);
create index on :Stop(name);
schema await
@bubunyo
bubunyo / install-redis.sh
Last active September 2, 2016 15:58 — forked from FUT/install-redis.sh
Install Redis on EC2
1. Install Linux updates, set time zones, followed by GCC and Make
sudo yum -y update
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
/etc/localtime
sudo yum -y install gcc make
2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download)
@bubunyo
bubunyo / celery.sh
Created August 17, 2016 08:20 — forked from amatellanes/celery.sh
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
package xyz.chanl.radio.data;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import java.util.List;
import de.greenrobot.dao.DaoMaster;
import de.greenrobot.dao.DaoSession;
import de.greenrobot.dao.Program;
@bubunyo
bubunyo / 0_reuse_code.js
Created April 22, 2016 18:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
package app.vfmesthack.kiss.ui.transactions;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.widget.ListView;
import java.util.List;
@bubunyo
bubunyo / base_controller.rb
Created January 4, 2016 00:38 — forked from dhoelzgen/base_controller.rb
CORS in Rails 4 APIs
class API::V1::BaseController < ApplicationController
skip_before_filter :verify_authenticity_token
before_filter :cors_preflight_check
after_filter :cors_set_access_control_headers
def cors_set_access_control_headers
headers['Access-Control-Allow-Origin'] = '*'
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS'
@bubunyo
bubunyo / EasingsConstants.java
Created November 12, 2015 12:48
Android interpolators using the bezier function in Path.class. From https://github.com/ai/easings.net/blob/master/easings.yml
package com.fisglobal.lfi.pnc.framework.util;
import android.support.v4.view.animation.PathInterpolatorCompat;
import android.view.animation.Interpolator;
/**
* Cheatsheet: http://easings.net/
*/
public class EasingsConstants {
public static final Interpolator easeInSine = PathInterpolatorCompat.create(0.47f, 0f, 0.745f, 0.715f);
package multicast;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.net.UnknownHostException;
import java.util.Scanner;
public class MulticastSocketClient {