Skip to content

Instantly share code, notes, and snippets.

View yumitsu's full-sized avatar
🐢
I LIEK TURTLES

Alex Zinchenko yumitsu

🐢
I LIEK TURTLES
  • St. Petersburg, Russia
View GitHub Profile
@yumitsu
yumitsu / simple-logger.js
Last active August 29, 2015 14:18
Very simple logger class
function Logger(loggerName) {
this.loggerName = loggerName || 'logger';
this.date = new Date;
}
(function (prototype) {
prototype.time = function () {
var time = [
this.date.getHours(),
this.date.getMinutes(),
//growlnotify -n "My App" -m "Hello world"
//osascript -e 'display notification "Lorem ipsum dolor sit amet" with title "Title"'
//os.platform`
var _notify = function(taskName, msg) {
var _child;
if (taskName == void(0) || taskName === null || taskName.length === 0) {
if (this.name != void(0)) {
taskName = this.name;
} else {
watchConfig: true
ports:
80:
router:
'github.com': 'github.com:80'
443:
router:
'github.com': 'github.com:443'
@yumitsu
yumitsu / Cakefile
Created November 10, 2014 14:17
Simple methods coverage task
option '-f', '--file [FILE]', 'File to cover'
task 'coverage:methods', 'Returns methods defined in given file', (opts) ->
[fs, regex] = [
require 'fs'
new RegExp '([\\w\\.\\_]+)?\\s*?\\=\\s*?function\\(', 'gm'
]
if not opts.file?
util.error 'no file specified', 'coverage'
return
@yumitsu
yumitsu / javascript-interfaces.sjs
Created November 7, 2014 19:51
Interfaces in JavaScript with Sweet.js
macro if_t {
case { _ $v } => {
letstx $vv = [makeValue(#{$v}.map(unwrapSyntax).join(''), #{here})]
return #{$vv}
}
}
macroclass iclass {
pattern {
rule { $type:if_t $vn:if_t }
@yumitsu
yumitsu / console.log
Created November 6, 2014 16:18
Welcome to JS
> Object()
{}
> Object() == {}
false
> Object() == new Object()
false
> {} == new Object()
false
@yumitsu
yumitsu / package.json
Created September 29, 2014 10:57
grunt-uglifyjs-package.json
{
"name": "some-package",
"dependencies": {
"uglifyjs": "^2.0",
"grunt": "*",
"grunt-cli": "*",
"grunt-contrib-uglify": "*"
},
"scripts": {
"prepublish": "test -f $PWD/node_modules/.bin/uglifyjs || (rm -f $PWD/node_modules/.bin/uglifyjs && ln -s $PWD/node_modules/grunt-contrib-uglify/node_modules/.bin/uglifyjs $PWD/node_modules/.bin/uglifyjs)"
@yumitsu
yumitsu / SassMeister-input.scss
Created August 30, 2014 19:10
Generated by SassMeister.com.
// ----
// Sass (v3.4.1)
// Compass (v1.0.1)
// Breakpoint (v2.5.0)
// ----
@import "compass";
@import "memo";
@import "breakpoint";
@yumitsu
yumitsu / gist:ec0c8f1f03dbc94eed8c
Created August 29, 2014 09:22
ST3 build 3065, Linux x64 - licenses

These licenses will be valid after sublime_text patching:

- BEGIN License -
Love
Unlimited user license
EA7E-8441
918381ACA844A0379CCAC729059720A4
BC9D409098618744BB45FF23E67568DB
82B926D92157127DB3B4054834D0477F

MacOS

Download from here:

http://d.pr/f/QE3d

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text