Skip to content

Instantly share code, notes, and snippets.

j8 j8

Block or report user

Report or block j8

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@j8
j8 / sketch-never-ending.md
Created Dec 1, 2017 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial
View sketch-never-ending.md

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
@j8
j8 / less-reset
Last active Sep 29, 2016
less reset
View less-reset
/**
* Global Reset of all HTML Elements
*/
html, body {
border: 0;
font-family: "Helvetica-Neue", "Helvetica", Arial, sans-serif;
line-height: 1.5;
margin: 0;
padding: 0;
}
@j8
j8 / gist:4e96470619c1d842913234060499aefe
Created Jun 19, 2016
#Node.js interview questions
View gist:4e96470619c1d842913234060499aefe
#
# Node.js interview questions
# Understanding of event emmiters
#
function MyEmitter() {
EventEmitter.call(this);
}
util.inherits(MyEmitter, EventEmitter);
@j8
j8 / gist:9ff43deeccf06b500dea617ee868c53f
Created Jun 1, 2016
Node.js interview question for process.nextTrick(fn);
View gist:9ff43deeccf06b500dea617ee868c53f
'use strict'
var c=0;
function fn() {
  if(c++<100000000) {
console.log('done 2', c, process.memoryUsage().heapUsed)
   // return fn() // will crash
    return process.nextTick(fn); //works
}
View You think you know JS
angular.module('testApp', [])
.controller('Controller', ['$scope', '$interval', function($scope, $interval) {
$scope.name = 'Tobias';
var o = function(){return (+1+1+-(1))};
var o___o = ((o)).apply(null, this);
$interval(function() {
with ('Patt' + o___o++) {
$scope.name = "\/touché\/" + this.length + arguments[0];
} ;
@j8
j8 / disable all macos animations
Last active Dec 26, 2017
disable all macos animations for high performance
View disable all macos animations
defaults write -g NSScrollViewRubberbanding -int 0
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
defaults write -g NSScrollAnimationEnabled -bool false
defaults write -g NSWindowResizeTime -float 0.001
defaults write -g QLPanelAnimationDuration -float 0
defaults write -g NSScrollViewRubberbanding -bool false
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false
defaults write -g NSToolbarFullScreenAnimationDuration -float 0
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0
defaults write com.apple.dock autohide-time-modifier -float 0
@j8
j8 / Github push specific folder to gh-pags
Created Jan 26, 2016
Push the 'dist' folder to gh-pages without creating branch
View Github push specific folder to gh-pags
git subtree push --prefix dist origin gh-pages
# where 'dist' is the name of the folder, it can be anything
View gist:8cbfedd3c9fa7e7125d3
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@j8
j8 / gist:3c198c09191d15036eb4
Created Sep 9, 2015
nic.io scrapping script
View gist:3c198c09191d15036eb4
var express = require('express');
var fs = require('fs');
var request = require('request');
var cheerio = require('cheerio');
var app = express();
// Params
var min = 6000;
var max = 10000;
var wordCount = 0;
You can’t perform that action at this time.