Skip to content

Instantly share code, notes, and snippets.

View JamesMura's full-sized avatar

James Muranga JamesMura

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jamesmura on github.
  • I am jamesmuranga (https://keybase.io/jamesmuranga) on keybase.
  • I have a public key ASBYg5MLscCuXL8A8STq5j7RENwWxvE_L-TGaMwt_hZPvQo

To claim this, I am signing this object:

@JamesMura
JamesMura / main.tf
Created April 8, 2017 20:04
Lumen terraform sample
variable "do_token" {}
provider "digitalocean" {
token = "${var.do_token}"
}
resource "digitalocean_droplet" "main" {
image = "Dokku 0.6.5 on 14.04"
name = "lumen-test-site"
region = "sfo2"
@JamesMura
JamesMura / 0_reuse_code.js
Created February 10, 2017 18:05
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
@JamesMura
JamesMura / rwanda_province.json
Created March 30, 2015 12:02
sample geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JamesMura
JamesMura / Gemfile
Created March 13, 2015 15:52
Ruby friday sinatra example
# A sample Gemfile
source "https://rubygems.org"
gem "sinatra"
gem "datamapper"
gem "dm-sqlite-adapter"
gem "faker"
@JamesMura
JamesMura / fizzbuzz.rb
Created October 24, 2014 14:20
Fizz Buzz
numbers = 1..101
numbers.each do | number|
if number % 15 == 0
puts "fizz buzz"
elsif number % 5 == 0
puts "buzz"
@JamesMura
JamesMura / local_settings.py
Created December 5, 2013 14:12
BACKEND_CONFIGURATION
BACKENDS_CONFIGURATION = {
"vumi": {
"ENGINE": "rapidsms.backends.vumi.VumiBackend",
"sendsms_url": "http://2.2.2.1:9000/send/",
"sendsms_user": "username",
"sendsms_pass": "password",
}
}
@JamesMura
JamesMura / send_messages.py
Created December 5, 2013 14:04
proposed changes to send_messages
import traceback
import time
import urllib2
from django.core.management.base import BaseCommand
from django.db.models import Q
from rapidsms_httprouter.models import Message, MessageBatch
from django.conf import settings
from django.core.mail import send_mail
from django.db import transaction, close_connection
from urllib import quote_plus
@JamesMura
JamesMura / rapidsms.yaml
Created November 25, 2013 12:12
Rapidsms Vumi config
smpp_transport:
transport_name: "transport"
system_id: smppclient1 # username
password: password # password
host: 127.0.0.1 # the host to connect to
port: 2775 # the port to connect to
rapidsms_relay:
transport_name: 'transport'
rapidsms_url: "http://2.2.2.2/backend/vumi-fake-smsc/"
@JamesMura
JamesMura / EGOCache.podspec
Created November 20, 2013 16:34
EGOCache podspec for head
Pod::Spec.new do |s|
s.name = 'EGOCache'
s.version = '2.0'
s.license = 'MIT'
s.summary = 'Fast Caching for Objective-C (iPhone & Mac Compatible).'
s.homepage = 'https://github.com/enormego/EGOCache'
s.author = 'enormego'
s.source = { :git => 'https://github.com/enormego/EGOCache.git' }
s.source_files = '*.{h,m}'