Skip to content

Instantly share code, notes, and snippets.

View iheanyi's full-sized avatar
🪐
Working on databases @planetscale

Iheanyi Ekechukwu iheanyi

🪐
Working on databases @planetscale
View GitHub Profile
@iheanyi
iheanyi / database.yml
Last active August 13, 2021 18:09
Code samples for "Building PlanetScale with PlanetScale"
# config/database.yml
development:
primary:
<<: *default
port: <%= ENV['ENABLE_PSDB'] ? 3305 : nil %>
database: <%= ENV['ENABLE_PSDB'] ? 'ourdatabase' : 'psdb_development' %>
primary_replica:
<<: *default
port: <%= ENV['ENABLE_PSDB'] ? 3305 : nil %>
@iheanyi
iheanyi / SOCKS proxy
Created March 19, 2020 21:33 — forked from cainejette/SOCKS proxy
SOCKS proxy
function FindProxyForURL(url, host) {
if (isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0"))
return "SOCKS 127.0.0.1:9998";
// Default to using no proxy.
return "DIRECT";
}
@iheanyi
iheanyi / SOCKS proxy
Created March 19, 2020 21:33 — forked from cainejette/SOCKS proxy
SOCKS proxy
function FindProxyForURL(url, host) {
if (isInNet(dnsResolve(host), "10.0.0.0", "255.0.0.0"))
return "SOCKS 127.0.0.1:9999";
// Default to using no proxy.
return "DIRECT";
}
@iheanyi
iheanyi / .tmux.conf
Created February 23, 2020 19:44
Iheanyi's Window Terminals stuff
# Let's use 256 colors for the screen
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
#urxvt tab like window switching (-n: no prior escape seq)
bind -n S-down new-window
bind -n S-left prev
bind -n S-right next
bind -n C-left swap-window -t -1
bind -n C-right swap-window -t +1

Keybase proof

I hereby claim:

  • I am iheanyi on github.
  • I am iheanyi (https://keybase.io/iheanyi) on keybase.
  • I have a public key whose fingerprint is 69BC 764C F372 2997 1C5F EDED 9832 D45E B853 5713

To claim this, I am signing this object:

import Ember from 'ember';
window.featureFlags = {
'foo': true
}
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
featureFlags: Ember.inject.service(),
fooEnabled: Ember.computed('featureFlags', function() {
@iheanyi
iheanyi / mock_oauth_test.go
Created January 14, 2017 21:10
Simple Mock OAuth Test for SPA + API Go application
import (
headspin "github.com/iheanyi/headspin-backend"
"github.com/labstack/echo"
"golang.org/x/oauth2"
"log"
"net/http"
"net/http/httptest"
"strings"
"testing"
)
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
modelName: Ember.computed('model', function() {
return this.get('model.constructor.modelName');
})
});
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
const ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action');
export const { ACTION } = ClosureActionModule;
const {
assert,
getOwner,
typeOf,