Skip to content

Instantly share code, notes, and snippets.

View kevinsimper's full-sized avatar

Kevin Simper kevinsimper

View GitHub Profile
@kevinsimper
kevinsimper / index.js
Last active May 3, 2016 00:16
requirebin sketch
var Crafty = require('craftyjs');
Crafty.init(600, 300);
Crafty.background('rgb(127,127,127)');
//Paddles
Crafty.e("Paddle, 2D, DOM, Color, Multiway")
.color('rgb(255,0,0)')
.attr({ x: 20, y: 100, w: 10, h: 100 })
.multiway(4, { W: -90, S: 90 });
Crafty.e("Paddle, 2D, DOM, Color, Multiway")
var mongoose = require('mongoose')
var tweets = new mongoose.Schema({
message: String,
timestamp: String
})
module.exports = mongoose.model('tweets', tweets)
var express = require('express')
var Promise = require('bluebird')
var app = express()
var request = require('request')
var through2 = require('through2')
app.all('*', function(req, res) {
var proxyRequest = request({
url: 'http://requestb.in/ueod4pue',
method: req.method,
})
gulp.src([‘./app/*.js’])
.pipe(through2.obj(function(file, enc, callback) {
var self = this
var b = browserify()
b.add(file.path)
b.transform(reactify)
b.bundle(function(err, src) {
if(err) console.log(err)
// here we need to push the file down the stream
})
@kevinsimper
kevinsimper / delete-remote-branches.sh
Created September 3, 2015 09:25
Delete already merged remote branches easily
git branch -r --merged | \
awk -F'/' '/^ *origin/{if(!match($0, /(>|master)/)){print $2}}' | \
xargs git push origin --delete
@kevinsimper
kevinsimper / 02.make
Created January 15, 2016 08:35
Error when installing eth
2016-01-14 22:34:53 +0100
make
/usr/local/Cellar/cmake/3.4.1/bin/cmake -H/tmp/cpp-ethereum20160114-61668-tqppki -B/tmp/cpp-ethereum20160114-61668-tqppki --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.4.1/bin/cmake -E cmake_progress_start /tmp/cpp-ethereum20160114-61668-tqppki/CMakeFiles /tmp/cpp-ethereum20160114-61668-tqppki/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/cpp-ethereum_BuildInfo.h.dir/build.make CMakeFiles/cpp-ethereum_BuildInfo.h.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f webthree-helpers/utils/libscrypt/CMakeFiles/scrypt.dir/build.make webthree-helpers/utils/libscrypt/CMakeFiles/scrypt.dir/depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f webthree-helpers/utils/secp256k1/CMakeFiles/secp256k1.dir/build.make webthree-helpers/utils/secp256k1/CMakeFiles/secp256k1.dir/depend

Keybase proof

I hereby claim:

  • I am kevinsimper on github.
  • I am kevinsimper (https://keybase.io/kevinsimper) on keybase.
  • I have a public key whose fingerprint is C3AC 22A4 B561 A9F2 F592 5669 B62A DCDD 91DE 5490

To claim this, I am signing this object:

Process: Mix-ide [70899]
Path: /Applications/Mix-ide.app/Contents/MacOS/Mix-ide
Identifier: .
Version: ??? (mix )
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Mix-ide [70899]
User ID: 501
Date/Time: 2016-06-06 15:42:53.081 -0500
@kevinsimper
kevinsimper / index.html
Created June 12, 2016 05:02
React Workshop in Lima template index.js
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="container"></div>
<script src="https://fb.me/react-15.1.0.js"></script>
<script src="https://fb.me/react-dom-15.1.0.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.24/browser.min.js"></script>
import React, { Component } from 'react'
import styles from './style.scss'
export default class Table extends Component {
render() {
const { data } = this.props
if(data.length === 0) {
return (
<div>No data to show in table.</div>