View musk_productivity_tips.mkd

Elon Musk's 6 Productivity Tips

  1. Nix big meetings
    "Excessive meetings are the blight of big companies and almost always get worse over time. Please get [out] of all large meetings, unless you're certain they are providing value to the whole audience, in which case keep them very short."
  2. Ditch frequent meetings too
    "Also get rid of frequent meetings, unless you are dealing with an extremely urgent matter. Meeting frequency should drop rapidly once the urgent matter is resolved."
  3. Leave a meeting if you're not contributing
    "Walk out of a meeting or drop off a call as soon as it is obvious you aren't adding value. It is not rude to leave, it is rude to make someone stay and waste their time."
  4. Drop jargon
View index.html
<!doctype html>
<meta charset="utf-8">
<body>
<script src="//d3js.org/d3.v4.min.js"></script>
<script>
let margin = {top: 100, right: 100, bottom: 100, left: 100};
let width = 960,
height = 500,
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View firebase-rule-pretty-printer.js
// This is just a toy. I used this to experient before adding more advanced functionality into Targaryen.
const esprima = require('esprima');
var expr = "data.val() == null && auth != null && (auth.isWorker == true || (newData.parent().child('chatType').val() == 'oneToOne' && $chatID.contains(auth.uid) == true || newData.parent().child('chatType').val() == 'group' && newData.parent().child('users').val() != null && newData.parent().child('users').child(auth.uid).val() != null || newData.parent().child('chatType').val() == 'org' && (auth.officialCounselorAt == null && $chatID.contains(auth.uid) == true || newData.parent().child('orgID').val() != null && auth.officialCounselorAt != null && auth.officialCounselorAt[newData.parent().child('orgID').val() + ''] == true))) || data.val() != null && newData.val() != null && auth != null && auth.isWorker == true || data.val() != null && newData.val() == null && auth != null && auth.isWorker == true";
var tree = esprima.parse(expr);
// BinaryExpression
// CallExpres
View README.md

Mac OS X - Wallpaper Changer

Swift code to change the Wallpaper for all screens. Currently, it changes only the current spaces' wallpaper. I'm working on a version to change in all spaces.

Usage: WallpaperChanger "/Users/username/SomeFolder/SomePicture.jpg"

View gist:f2a03810fe9bce77888d
/*jshint node:true*/
var http = require('http');
var fs = require('fs');
var url = require('url');
var querystring = require('querystring');
var head = fs.readFileSync('head.html','UTF-8');
//<head>
// <meta charset="utf-8">
View ForceCaseSensitivityPlugin.js
var fs = require('fs');
var path = require('path');
var _ = require('lodash');
module.exports = function ForceCaseSensitivityPlugin() {
this.plugin('normal-module-factory', function(nmf) {
nmf.plugin('after-resolve', function(data, done) {
var parentDir = path.dirname(data.resource);
var resourceName = path.basename(data.resource);
fs.readdir(parentDir, function(err, files) {
View sass_get_asset_url.rb
require 'json'
module Sass::Script::Functions
def get_md5s
md5sfile = File.join Dir.pwd, 'tmp/browser/cache/md5.json'
return JSON.parse(File.read(md5sfile))
end
View get_asset_url.js
var fs = require('fs');
var path = require('path');
var md5itCfg = require('../grunt/config/cl_md5it');
module.exports = function(babel) {
var t = babel.types;
var md5sFile = md5itCfg.options.manifestFile;
var md5s, cache = {};