codepen utility for an simple information tooltip about the pen and the author
A Pen by Bernhard Bücherl on CodePen.
// this file fixes yarn bugs with linked binaries inside docker mounts | |
const path = require("path"); | |
const fs = require("fs-extra"); | |
const TreeWalker = require("npm-tree-walker"); | |
const SH_TEMPLATE = binPath => | |
`#!/bin/sh | |
if [ -x "$basedir/node" ]; then | |
"$basedir/node" "${binPath}" "$@" | |
ret=$? |
# script to delete unnecessary apple apps | |
rm -Rvf /Applications/FaceTime.app | |
rm -Rvf /Applications/Game\ Center.app | |
rm -Rvf /Applications/Chess.app | |
rm -Rvf /Applications/Dashboard.app | |
rm -Rvf /Applications/iBooks.app | |
rm -Rvf /Applications/Messages.app | |
rm -Rvf /Applications/Photos.app | |
rm -Rvf /Applications/DVD\ Player.app |
#define JSEXPORT_METHOD(tpl, name, cb) do { \ | |
v8::Local<v8::FunctionTemplate> t = NanNew<v8::FunctionTemplate>(cb); \ | |
tpl->InstanceTemplate()->Set(NanNew<v8::String>(name), \ | |
t->GetFunction(), v8::ReadOnly); \ | |
} while (0) | |
#define JSTOSTRING(handle) \ | |
(new v8::String::Utf8Value(handle->ToString()))->operator*() | |
#define MUTEX_LOCK(mutex, action) do { \ |
#ifndef INCLUDE_MACROS_H_ | |
#define INCLUDE_MACROS_H_ | |
// concat arguments | |
#define CONCAT(a, b) a ## b | |
// macro to count passed arguments (maximum 63 arguments) | |
#define NUM_ARGS(...) NUM_ARGS_(,__VA_ARGS__, 63, 62, 61, 60, 59, 58, 57, 56, \ | |
55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, \ | |
36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, \ | |
17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); |
var ExampleClass = utils.Class(function(con, struc, tor) { | |
this.super([], [struc]); | |
this.con = con; | |
this.tor = tor; | |
}, [events.EventEmitter, OtherClass], { | |
print: function() { | |
return this.con + this.tor; | |
} | |
}); |
var chokidar = require("chokidar"), | |
win = require("nw.gui").Window.get(), | |
watcher = chokidar.watch(process.cwd(), { persistent: true }), | |
reloader = function() { | |
win.reload(); | |
}; | |
watcher.on("ready", function() { | |
watcher.on("add", reloader) | |
.on("addDir", reloader) | |
.on("change", reloader); |
import java.util.ArrayList; | |
import java.util.Properties; | |
import javax.naming.Context; | |
import javax.naming.NamingEnumeration; | |
import javax.naming.NamingException; | |
import javax.naming.directory.Attributes; | |
import javax.naming.directory.InitialDirContext; | |
import javax.naming.directory.SearchControls; | |
import javax.naming.directory.SearchResult; |
codepen utility for an simple information tooltip about the pen and the author
A Pen by Bernhard Bücherl on CodePen.
var normalizeEvent = ( function( ) { | |
var getPixels = function( style ) { | |
switch( style ) { | |
case "thick": | |
return 6; | |
case "medium": | |
return 4; | |
case "thin": | |
return 2; | |
default: |
{ | |
"always_show_minimap_viewport": true, | |
"caret_extra_bottom": 2, | |
"caret_extra_top": 2, | |
"caret_style": "solid", | |
"color_scheme": "Packages/User/Br4ckets/Br4ckets (Day).tmtheme", | |
"theme": "Edgy.sublime-theme", | |
"detect_indentation": false, | |
"ensure_newline_at_eof_on_save": true, |