Skip to content

Instantly share code, notes, and snippets.

@MadLittleMods
MadLittleMods / command-runner-promisified-exec.js
Last active November 23, 2020 19:47
child_process, shell
var Promise = require('bluebird');
var exec = require('child_process').exec;
var commandRunner = function(command) {
return new Promise(function(resolve, reject) {
var child = exec(command, function(err, stdout, stderr) {
var resultInfo = {
command: command,
stdout: stdout,
stderr: stderr,

Often when I try to merge a branch with Git on Windows, I get Permission denied errors. I am not sure what is the cause but cleaning up and trying to the merge again works.

Steps

> git merge develop
error: unable to create file public/less/bootstrap/dropdowns.less (Permission denied)
// https://gist.github.com/MadLittleMods/39f4cd9867fb12143ece2647de2283fb
// via JavaScript implementation by Camilo Martin, http://stackoverflow.com/a/29585579/796832
//
// @angle: in degrees
.filter-hue-rotate(@color, @angle) {
@r: red(@color);
@g: green(@color);
@b: blue(@color);
@clampedAngle: unit(mod(mod(@angle, 360) + 360, 360));
'use strict';
var argv = require('yargs').argv;
// See https://github.com/yargs/yargs/issues/402
// This will shim the `.option({ position: x })` that was in `nomnom` but we are now using `yargs`
var shimPositionOption = function(optionsOpts) {
var opts = Object.assign({}, optionsOpts);
if(opts.hasOwnProperty('position') && opts.position < argv._.length) {

Desert Golf

Level 4277

You have to balance on the nub by jumping up there just right (it will take many tries)

It's not possible to wall climb up far enough to be able to shoot in the right-hand direction, http://i.imgur.com/Z5P2cHZ.png

const webpack = require('webpack');
const MemoryFS = require('memory-fs');
const memoryFs = new MemoryFS();
memoryFs.writeFileSync('/entry1.js', `System.global = { foo: 'bar' };`, 'utf-8');
const compiler = webpack({
entry: '/entry1.js',
output: {
const fs = require('fs-extra');
const emojiNameToUnicodeVersion = require('emoji-unicode-version');
const emojione = require('emojione');
const emojiMap = require('emojione/emoji.json');
const versionToEmojisMap = {
'1.1': [],
'3.0': [],
'3.2': [],
@MadLittleMods
MadLittleMods / .zshrc
Last active April 23, 2017 22:22
~/.oh-my-zsh/eric.zsh-theme
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/mlm/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="eric"