Skip to content

Instantly share code, notes, and snippets.

@yeluolei
yeluolei / app.js
Created September 8, 2017 03:09 — forked from acdlite/app.js
Quick and dirty code splitting with React Router v4
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
@yeluolei
yeluolei / app.js
Created March 3, 2017 09:52 — forked from brianfeister/app.js
Angular Upload with Image Crop
angular.module('cropAndUpload', [
'angularFileUpload',
'ngImgCrop'
])
@yeluolei
yeluolei / xcode-build-bump.sh
Created May 20, 2016 06:51 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@yeluolei
yeluolei / php.patch
Last active March 21, 2016 02:25
patch for php 5.4 open read timeout feature for mysqlnd
diff --git 1/php-5.4.42/ext/mysqli/mysqli_api.c 2/php-5.4.42-patch/ext/mysqli/mysqli_api.c
index 0b28a43..133de4a 100644
--- 1/php-5.4.42/ext/mysqli/mysqli_api.c
+++ 2/php-5.4.42-patch/ext/mysqli/mysqli_api.c
@@ -1652,14 +1652,14 @@ static int mysqli_options_get_option_zval_type(int option)
#ifdef MYSQL_OPT_PROTOCOL
case MYSQL_OPT_PROTOCOL:
#endif /* MySQL 4.1.0 */
-#ifdef MYSQL_OPT_READ_TIMEOUT
+//#ifdef MYSQL_OPT_READ_TIMEOUT

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
http://www.kernelops.com/gitlab-post-receive-webhook/
{
"ref":"refs/tags/asdas",
"user_id":12,
"user_name":"jeroen",
"project_id":18,
"repository": {
"name":"gltest",
"url":"jeroen@localhost:jeroen/gltest.git",
"description":"",
"homepage":"http://localhost:3000/jeroen/gltest"