Skip to content

Instantly share code, notes, and snippets.

View kimobrian's full-sized avatar
Life is for the alive

Kimo kimobrian

Life is for the alive
  • Nairobi,Kenya
  • 22:26 (UTC +03:00)
View GitHub Profile
@kimobrian
kimobrian / combine.md
Last active February 17, 2018 07:13
A gist describing different tools in the GraphQL ecosystem: graphql-tools

makeExecutableSchema

import { makeExecutableSchema } from 'graphql-tools';

const executableSchema = makeExecutableSchema({
  typeDefs,
  resolvers,
});
@kimobrian
kimobrian / apollo-server.md
Created February 16, 2018 12:40
A gist describing different tools in the GraphQL ecosystem: apollo-server
import express from 'express';
import bodyParser from 'body-parser';
import { graphqlExpress } from 'apollo-server-express';

let typeDefs = ``;
let resolvers = { /* ... */ };
let executableSchema = /* makeExecutableSchema ... */
const PORT = 3000;
@kimobrian
kimobrian / apollo-client.md
Last active February 16, 2018 13:12
A gist describing different tools in the GraphQL ecosystem: react-apollo, apollo-client
import { ApolloClient } from 'apollo-client';
import { HttpLink } from 'apollo-link-http'; // HttpLink replaces createNetworkInterface

// Create client that connects to the server
const client = new ApolloClient({
  link: HttpLink({ uri: /* server URL */}),
})
@kimobrian
kimobrian / server.js
Created February 19, 2018 13:15
Express webpack serve issue
var express = require('express');
var app = express();
var webpack = require('webpack');
var path = require('path');
var compiler = webpack(require('./webpack.config.js'));
app.use(require('webpack-dev-middleware')(compiler, {
noInfo: true,
publicPath: '/'
@kimobrian
kimobrian / circleci-heroku-continuous-deployment2.0.md
Created March 6, 2018 09:17 — forked from lauraturk/circleci-heroku-continuous-deployment2.0.md
instructions for deploying from circleci2.0 to heroku
@kimobrian
kimobrian / tmux-cheatsheet.markdown
Created April 9, 2018 23:37 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Keybase proof

I hereby claim:

  • I am kimobrian on github.
  • I am k6i (https://keybase.io/k6i) on keybase.
  • I have a public key ASDNGucP5CPrEnuG2buZ2SXLNCfP66Q1hM2ecAwKRIui4wo

To claim this, I am signing this object:

@kimobrian
kimobrian / components.my-component.js
Last active May 4, 2018 08:06
Test Action Closures
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
logMessage: function() {
this.get('log')();
}
}
});
@kimobrian
kimobrian / git-auto-sign-commits.sh
Created June 21, 2019 20:39 — forked from mort3za/git-auto-sign-commits.sh
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)

Keybase proof

I hereby claim:

  • I am kimobrian on github.
  • I am warrior254 (https://keybase.io/warrior254) on keybase.
  • I have a public key ASDg_TdpvhJfjhNjmmF57kv9ZwLSvY_oxD9q3dnqVc-_Jgo

To claim this, I am signing this object: