Skip to content

Instantly share code, notes, and snippets.

View cycold's full-sized avatar

cy cycold

  • ShenZhen, China
View GitHub Profile
@cycold
cycold / sublime-other.sublime-keymap
Created September 11, 2014 06:24
sublime key shutcuts
[
{ "keys": ["alt+/"], "command": "auto_complete" },
{ "keys": ["ctrl+shift+c"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+shift+g"], "command": "find_all_under" },
{ "keys": ["ctrl+shift+x"], "command": "open_dir", "args": {"dir": "$file_path", "file": "$file_name"} },
{ "keys": ["ctrl+shift+s"], "command": "reveal_in_side_bar"},
{ "keys": ["ctrl+shift+z" ], "command": "view_in_browser" },
{ "keys": ["ctrl+shift+l"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+shift+h"], "command": "prev_view_in_stack" },
{ "keys": ["alt+l"], "command": "focus_neighboring_group" },
@cycold
cycold / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cycold
cycold / functions.js
Created February 12, 2015 03:27
commone js functions
function isFunction(fun){
return typeof fun === 'function';
}
function isObject(obj){
return toString.apply(obj) == '[object Object]';
}
function isString(str){
return typeof str === 'string';
}
function isNumeric(num){
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai</string>
<key>settings</key>
<array>
<dict>
<key>name</key>
@cycold
cycold / emoji_image_replace.js
Created December 10, 2015 08:40 — forked from mwunsch/emoji_image_replace.js
Detect emoji unicode on a page, replace it with images (supplied by GitHub, for now). Goes great in your ~/.js
/**
*
* Here's a thing that will look through all the text nodes of a document, and
* upon encountering an emoji codepoint, will replace it with an image.
* For now, those images are pulled from GitHub, which isn't very nice, so I
* need to find a more suitable host.
*
* Much of this code was gleaned from staring at the minified GitHub JS.
*
* Copyright (c) 2013 Mark Wunsch. Licensed under the MIT License.
@cycold
cycold / webpack.package.json
Last active January 23, 2016 05:14
webpack package json
{
"name": "vue-demo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"debug-details": "webpack -d --display-chunks --display-reasons --display-error-details --display-modules --config webpack.dev.config.js",
"debug-build": "rimraf dist && webpack -d --progress --display-error-details --config webpack.dev.config.js",
"dev": "webpack-dev-server --inline --hot --config webpack.dev.config.js",
"build": "rimraf dist && webpack --progress --hide-modules --config webpack.prod.config.js"

Quick install PHP 7.0:

1. Install depends PHP 7.0
$ brew install autoconf automake gmp homebrew/versions/bison27 gd freetype t1lib gettext zlib mcrypt
2. Configure PHP 7.0
$ git clone --depth=1 https://github.com/php/php-src.git

$ cd php-src

/**
* Created by cycold on 5/11/16.
*/
const path = require('path')
const webpack = require('webpack')
//https://github.com/webpack/extract-text-webpack-plugin
const ExtractTextPlugin = require("extract-text-webpack-plugin")
// https://github.com/ampedandwired/html-webpack-plugin
@cycold
cycold / gist:dfb884337dc58c3d94606b578fccf3ea
Created June 7, 2016 02:12 — forked from ibanez270dx/gist:75b935176a3dfaa7fdce
iTerm2 drop down over full-screen'd apps
Open iTerm2 over full-screen'd apps (HACK)
------------------------------------------
READ: https://gitlab.com/gnachman/iterm2/issues/1570
defaults write /Applications/iTerm.app/Contents/Info LSUIElement true