Skip to content

Instantly share code, notes, and snippets.

View j8's full-sized avatar
💭
I may be slow to respond.

genie j8

💭
I may be slow to respond.
View GitHub Profile
@jaydenseric
jaydenseric / zeit-now-g-suite-setup.md
Created March 20, 2017 04:46
Zeit Now G Suite setup

Run each of the following lines, replacing yourdomain.com and codehere with your details:

now dns add yourdomain.com @ TXT google-site-verification=codehere
now dns add yourdomain.com @ MX ASPMX.L.GOOGLE.COM 1
now dns add yourdomain.com @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add yourdomain.com @ MX ALT3.ASPMX.L.GOOGLE.COM 10
now dns add yourdomain.com @ MX ALT4.ASPMX.L.GOOGLE.COM 10
@j8
j8 / gist:4e96470619c1d842913234060499aefe
Created June 19, 2016 13:12
#Node.js interview questions
#
# Node.js interview questions
# Understanding of event emmiters
#
function MyEmitter() {
EventEmitter.call(this);
}
util.inherits(MyEmitter, EventEmitter);
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 March 28, 2024 10:18
disable all macos animations for high performance
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 January 26, 2016 09:31
Push the 'dist' folder to gh-pages without creating branch
git subtree push --prefix dist origin gh-pages
# where 'dist' is the name of the folder, it can be anything
@j8
j8 / line fill animation
Last active August 29, 2015 14:18
SVG line fill animation
'use strict';
angular.module('HireStack').directive('chartLines', ['$location', function($location){
// Runs dursuing compile
return {
// name: '',
// priority: 1,
// terminal: true,
// scope: {}, // {} = isolate, true = child, false/undefined = no change
// controller: function($scope, $element, $attrs, $transclude) {},
var OAuth = require('oauth')
// `npm install oauth` to satisfy
// website: https://github.com/ciaranj/node-oauth
var KEY = "<INSERT KEY HERE>"
var SECRET = "<INSERT SECRET HERE>"
var oauth = new OAuth.OAuth(
'http://api.thenounproject.com',
'http://api.thenounproject.com',
[
{
"id": 1,
"text": "Afrikaans",
"disabled": false
},
{
"id": 2,
"text": "Albanian",
"disabled": false
@j8
j8 / clear_ie10_localstorage
Created March 27, 2014 12:39
Clear localstorage in IE10+
#Type in the JS console the following:
localStorage.clear();
sessionStorage.clear();
@j8
j8 / git_empty_branch
Created February 14, 2014 08:32
Create new branch with empty folder structure
You can create a new empty branch like this:
$ git checkout --orphan NEWBRANCH
--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.
The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch.
Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: