Skip to content

Instantly share code, notes, and snippets.

View cyxou's full-sized avatar
🚀

Alex cyxou

🚀
View GitHub Profile
{
"bold_folder_labels": true,
"caret_style": "phase",
"theme": "Spacegray.sublime-theme",
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"font_face": "Inconsolata",
"font_size": 11,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@cyxou
cyxou / UbuntuNodejsInstall
Created February 2, 2014 11:48
Install nodejs on Ubuntu
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
curl https://npmjs.org/install.sh | sudo sh
@cyxou
cyxou / use-strict.sublime-snippet
Created May 30, 2014 07:17
use strict snippet
<snippet>
<content><![CDATA[
'use strict';
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>use</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
@cyxou
cyxou / jshint-jshint.sublime-snippet
Created May 30, 2014 07:18
inline jshint snippet
<snippet>
<content><![CDATA[
/* jshint ${1:expr}:${2:true} */
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>jsh</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<description>Inline JSHint</description>
</snippet>
[
{
"keys": ["alt+shift+a"], "command": "align_tab",
"args" : {"user_input" : "=/f"}
}
]
<snippet>
<content><![CDATA[
console.log($1);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>log</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<description>console.log()</description>
</snippet>
<snippet>
<content><![CDATA[
before(function(${1:done}) {
$2
${3:done();}
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>bef</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<snippet>
<content><![CDATA[
describe('${1:<Unit Test>}', function() {
$2
});
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>desc</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
@cyxou
cyxou / .tmux.conf
Last active August 29, 2015 14:02
.tmux.conf
# enable vi mode
setw -g mode-keys vi
# set prefix to Ctrl-a
set -g prefix C-a
unbind C-b
# set index for windows and pane to start from 1
set -g base-index 1
set -g pane-base-index 1
var MyApp = angular.module('MyApp');
MyApp.factory('msgBus', ['$rootScope', function($rootScope) {
var msgBus = {};
msgBus.emitMsg = function(msg, data) {
data = data || {};
$rootScope.$emit(msg, data);
};
msgBus.onMsg = function(msg, func, scope) {
var unbind = $rootScope.$on(msg, func);
if (scope) {