Skip to content

Instantly share code, notes, and snippets.

View cyxou's full-sized avatar
🚀

Alex cyxou

🚀
View GitHub Profile
@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) {
@cyxou
cyxou / ru.php
Created August 7, 2014 04:22
WP Affiliate Platform Russian Localisation
<?php
//Language file for Russian
// Login Widget related
define(AFF_WIDGET_TITLE, 'Affiliate Login');
define(AFF_WIDGET_LOGGED_IN_AS, 'You are logged in as:');
define(AFF_WIDGET_ACCESS_DASHBOARD, 'Access the Affiliate Dashboard');
// General
define(AFF_G_DATE, 'Дата');