Skip to content

Instantly share code, notes, and snippets.

@kjs3
kjs3 / kmonad-das.kbd
Created Mar 1, 2020
Kmonad config for Das 4 Pro for Mac
View kmonad-das.kbd
// Kmonad config for Das Mac keyboard - https://www.daskeyboard.com/daskeyboard-4-professional-for-mac/
INPUT = LINUX_DEVICE L64 /dev/input/by-id/usb-Metadot_-_Das_Keyboard_Das_Keyboard-event-kbd
OUTPUT = UINPUT_SINK
// Source codes
SRC
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15
grv 1 2 3 4 5 6 7 8 9 0 - = bspc home pgup numlock kpslash kpasterisk kpminus
tab q w e r t y u i o p [ ] \ del end pgdn kp7 kp8 kp9 kpplus
@kjs3
kjs3 / md-link-processing.md
Last active Aug 14, 2017
Markdown link processing
View md-link-processing.md
View git-setup.sh
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
git config --global push.default current
View Preferences.sublime-settings
{
"file_exclude_patterns": [
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
"*.o",
"*.a",
"*.lib",
View act-like-an-adult-slack.md

Slack, please for the love of God stop ingesting my gists as snippets.

@kjs3
kjs3 / module-testing.js
Last active Jul 6, 2016
Babel rewire and expect.js testing
View module-testing.js
// my-module.js
function privateFunc () {
console.log("Some convoluted logic.")
return 1 + 2
}
export default function () {
console.log("Hey! I'm the public interface for this module")
@kjs3
kjs3 / server.js
Created Dec 3, 2015
Reloading express routes/middleware on file change WITHOUT restarting node process.
View server.js
if ( process.env.NODE_ENV === 'production' ) {
// dev runs with babel-node so this isn't necessary
require('babel-core/register'); // this includes the polyfill
require('newrelic');
}
import 'source-map-support/register'
import Debug from 'debug'
import express from 'express'
@kjs3
kjs3 / gist:047c1a2467a6d62bf223
Created Jun 16, 2015
Trying to set Parse User ACL
View gist:047c1a2467a6d62bf223
var user = new Parse.User({
name: name,
username: email,
email: email,
password: password
});
user.signUp().then(
function() {
var user = Parse.User.current();
@kjs3
kjs3 / gist:11f2032228de0f5a23bb
Created May 19, 2015
Async mapi calls with ruby
View gist:11f2032228de0f5a23bb
require 'typhoeus'
require 'pry'
Typhoeus::Config.memoize = false
t1 = Time.now
base_url = "https://dev.mapi.move.com/properties/v1/search/"
limit = 20
@kjs3
kjs3 / gist:a3c17b6e97b1f94948ee
Created May 19, 2015
Async mapi calls with js
View gist:a3c17b6e97b1f94948ee
var request = require('superagent');
var async = require('async');
var _ = require('lodash');
console.time('Execution Time');
baseUrl = "http://dev.mapi.move.com/properties/v1/search/"
limit = 20
You can’t perform that action at this time.