Skip to content

Instantly share code, notes, and snippets.

@stolksdorf
stolksdorf / japan protips.md
Created February 3, 2019 17:12
Protips for Japan

Japan Protips

japan:

So I know very little about Kobe specifically, but Kyoto is supposed to be beautiful and worth visiting if she is that close. Definitely go to Himeji:

  • Himeji castle go early before it gets busy
  • then head to Mt Shosha, lots of shrines and temples including Engyō-ji she absolutely must visit at least one temple and one shrine and she's not allowed to leave until she does

practical stuff:

@stolksdorf
stolksdorf / map_reduce.js
Last active July 19, 2022 05:18
A collection of useful one-liners I tend to use
/* Non-mutating */
const map = (obj,fn)=>Object.keys(obj).map((key)=>fn(obj[key],key));
const reduce = (obj,fn,init)=>Object.keys(obj).reduce((a,key)=>fn(a,obj[key],key),init);
const filter = (obj,fn)=>Object.keys(obj).reduce((a,key)=>!!fn(obj[key],key)?a.concat(obj[key]):a,[]);
const times = (n,fn)=>Array.apply(null,{length:n}).map((_,i)=>fn(i));
const construct = (obj,fn)=>Object.keys(obj).reduce((a,key)=>{const [k,v]=fn(obj[key],key);a[k]=v;return a;},{});
const sequence = async (obj,fn)=>Object.keys(obj).reduce((a,key)=>a.then((r)=>fn(obj[key],key,r)), Promise.resolve());
@stolksdorf
stolksdorf / data.json
Created December 28, 2018 06:34
tpk: test sheet | This is the description of the thing
{
"a": 5
}
@stolksdorf
stolksdorf / data.json
Created December 28, 2018 06:18
tpk: test sheet
{
"a": 5
}
@stolksdorf
stolksdorf / .eslintrc.js
Last active November 23, 2018 01:07
My Linting Rules
module.exports = {
root : true,
parserOptions : {
ecmaVersion : 9,
sourceType : 'module',
//ecmaFeatures : { jsx : true },
},
env : {
node : true,
es6 : true,
@stolksdorf
stolksdorf / addLessRequires.js
Created June 19, 2018 19:40
Finds all jsx files in your system and adds a require to the less to them.
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const react = `const React = require('react');`
const convert = (filepath)=>{
let contents = fs.readFileSync(filepath, 'utf8');
contents = contents.replace(react, `require('./${path.basename(filepath, '.jsx')}.less');\n${react}`)
fs.writeFileSync(filepath, contents, 'utf8');
console.log(`Converted ${filepath}`);
@stolksdorf
stolksdorf / getCaller.js
Created June 16, 2018 15:29
Get Caller: Returns information about the function that called the function you are in.
const getCaller = (offset=0)=>{
const cache = Error.prepareStackTrace;
Error.prepareStackTrace = (_, stack)=>stack;
const target = (new Error()).stack[2+offset];
Error.prepareStackTrace = cache;
return {
name : target.getFunctionName(),
file : target.getFileName(),
line : target.getLineNumber(),
col : target.getColumnNumber(),

The Setting

Set in an alternative timeline of the Stargate the series. So characters of the show will not be present in this setting, but they might be parallel characters.

Stargate Command was formed upon the discovery of an ancient alien artifact discovered under a pyramid in Egypt. This device, known as the Stargate, can transport objects instantly across the galaxy to other Stargates. The SGC's primary mission is to seek out alien technology in order to progress and protect humanity.

The SGC has only been involved in full offworld operations for the last 8 months with over a dozens missions under it's belt. Much about the Stargate Network, alien technology, and other races is unknown.

You have been recruited to join SG-6, the SGC's newest team. You have been selected because of your extraordinary skills and talents. The SGC is always seeking exceptional individuals in the fields of strategy/tactics, diplomacy, physics/engineering, and languages/history/archaeology.

@stolksdorf
stolksdorf / jsx_guidelines.md
Created April 12, 2016 15:38
React Style Guide