Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Ikenna N. Okpala ikennaokpala

🎯
Focusing
View GitHub Profile
View braintree.rb
if Rails.env.production?
Braintree::Configuration.environment = Rails.env.staging? ? :sandbox : :production
Braintree::Configuration.merchant_id = ENV["braintree_merchant_id"]
Braintree::Configuration.public_key = ENV["braintree_public_key"]
Braintree::Configuration.private_key = ENV["braintree_private_key"]
else
Braintree::Configuration.environment = :sandbox
Braintree::Configuration.merchant_id = "<super secret>"
Braintree::Configuration.public_key = "<super secret>"
Braintree::Configuration.private_key = "<super secret>"
@ikennaokpala
ikennaokpala / _stylist_heroku_replay.sh
Last active September 28, 2018 09:31 — forked from stefansundin/heroku-replay.sh
Replay production Heroku requests to your local dev environment.
View _stylist_heroku_replay.sh
#!/bin/bash -e
app=stylist
dev=http://stylist.mslabs.io
heroku logs -t -s heroku -d router -a $app | {
while IFS= read -r line
do
path=$(echo $line | grep -oE 'path="([^"]+)"' | cut -d'"' -f2)
code=$(curl -s -o /dev/null -w "%{http_code}" "$dev$path")
View set_next_build_number.groovy
// Go to https://ci.integration.publishing.service.gov.uk/script and paste the code below
job = Jenkins.getInstance().getItemByFullName("smartanswers/master", Job.class)
job.nextBuildNumber = 3694
job.saveNextBuildNumber()
View flattening.sh
#!/bin/sh
COUNTRY="$1"
COUNTRIES="lib/smart_answer_flows/marriage-abroad/outcomes/countries"
COUNTRY_PARTIALS="$COUNTRIES/$COUNTRY"
rm -rf "$COUNTRY_PARTIALS"
cp -r "test/artefacts/marriage-abroad/$COUNTRY" "$COUNTRY_PARTIALS"
View auto-tweeter-gs.js
/* A Spreadsheet-powered Twitterbot Engine, version 0.4, May 2015
by Zach Whalen (@zachwhalen, zachwhalen.net, etc.)
This code powers the backend for a front-end in a google spreadsheet. If somehow you've arrived at this code without the spreadsheet, start by making a copy of that sheet by visiting this link:
bit.ly/botsheet
All of the setup instructions are available in the sheet or (with pictures!) in this blog post:
@ikennaokpala
ikennaokpala / bootstrapping.md
Created October 29, 2016 11:56 — forked from dideler/bootstrapping.md
Bootstrapping - a list of useful resources to get up and running quickly
View bootstrapping.md

Welcome!

UPDATE: This list is no longer maintained. I've moved it to its own repo so you can send suggestions as Pull Requests. https://github.com/dideler/bootstrapping/

For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.

Starring this gist will give me an idea of how many people consider this list useful.

@ikennaokpala
ikennaokpala / frontendDevlopmentBookmarks.md
Created October 29, 2016 11:51 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@ikennaokpala
ikennaokpala / sitemap.xsl
Created October 16, 2016 13:51
This is a sitemap stylesheet document
View sitemap.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XML Sitemap</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {