Skip to content

Instantly share code, notes, and snippets.

View jofomah's full-sized avatar
🎯
Focusing

Jideobi Ofomah jofomah

🎯
Focusing
View GitHub Profile
@jofomah
jofomah / go-stdlib-interface-selected.md
Created September 21, 2023 14:25 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@jofomah
jofomah / generate-ssh-key.sh
Created October 27, 2018 20:15 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@jofomah
jofomah / Response.php
Created October 4, 2018 12:18 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@jofomah
jofomah / shopify.datalayer.html
Created May 2, 2018 17:00 — forked from samba/shopify.datalayer.html
Shopify DataLayer Checkout
{% if first_time_accessed %}
<script>
(function(dataLayer){
var customer_type = ({{customer.orders_count}} > 1) ? 'repeatcustomer' : 'newcustomer';
var discounts = "{{ order.discounts | map: 'code' | join: ',' | upcase}}";
function strip(text){
return text.replace(/\s+/, ' ').replace(/^\s+/, '').replace(/\s+$/, '');
}
@jofomah
jofomah / README-Template.md
Created February 17, 2018 10:10 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jofomah
jofomah / example.js
Created October 20, 2016 13:09 — forked from jedp/example.js
Node.JS CouchDB paginator
var cradle = require('cradle');
// change as necessary
var host = '127.0.0.1';
var port = 5984;
var dbname = 'foo';
// setup cradle db and paginator
var conn = new (cradle.Connection)(host, port);
var db = conn.database(dbname);
@jofomah
jofomah / pip-install-gdal.md
Created November 2, 2015 15:28 — forked from cspanring/pip-install-gdal.md
Installing GDAL in a Python virtual environment

Installing GDAL in a Python virtual environment

Get gdal development libraries:

$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev

Create and activate a virtual environment:

sources:
osm_config_file: boundary.ini # relative file path to the [export|manage].py
data_directory: '/home/jofomah/sw-projects/posm/planet.osm/' # full path to the data directory
data_file: 'planet-latest' # a filename for initial OSM file
poly_file: './poly/NG_R192787.poly' # path to the area poly file, can be blank if working with planet.osm
admin_levels_file: 'admin_levels' # a file name for the file containing prepared admin_levels
# gdal driver specific settings
exposm: