Skip to content

Instantly share code, notes, and snippets.

Avatar
🔒
Fighting for freedom, security and privacy 🔐

Charlike Mike Reagent tunnckoCore

🔒
Fighting for freedom, security and privacy 🔐
View GitHub Profile
@tunnckoCore
tunnckoCore / test.js
Created Nov 2, 2018
Fetch API Post example
View test.js
zzzzzzzzzzzzzzzzz
@tunnckoCore
tunnckoCore / cloudSettings
Last active Mar 19, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-03-19T00:19:15.758Z","extensionVersion":"v3.4.3"}
@tunnckoCore
tunnckoCore / some-app.js
Last active Oct 2, 2017
Fractal & functional state management for unidirectional data flow, a la Elm in just 2kb
View some-app.js
// SSR with just registering for ESM:
// import 'mindom/import' // 1.1kb
// or register for CJS:
// require('mindom/require') // 1.1kb
import {
morph,
createView,
createStore,
@tunnckoCore
tunnckoCore / foo.js
Created Oct 2, 2017
basic arithmetic memoization - failed try
View foo.js
const app = require('parse-function')()
let cacheHits = 0
const cache = {}
function memoizeArithmetic(arithmeticExpr) {
function __memoizedArithmeticFn__() {
// not too efficient! probably `split` could be used..
const key = app
@tunnckoCore
tunnckoCore / result
Created Aug 17, 2017 — forked from BananaAcid/result
subdirs + includes
View result
// ˫ routes ˫ index.js
GET /
// ˫ routes ˫ api1 ˫ index.js
GET /api/v1/
GET /api/v1/x
// ˫ routes ˫ api1 ˫ a.js
PUT /api/v1/a/obj/:one/:two
View get-user-packages.js
const request = require('simple-get')
const getNpmUserPackages = name =>
new Promise(resolve => {
let packages = []
function req(page, cb) {
let url = `https://www.npmjs.com/profile/${name}/packages?offset=${page}`
request.concat(url, (e, _, data) => {
if (e) return reject(e)
@tunnckoCore
tunnckoCore / styles.less
Created Aug 3, 2017 — forked from brandondurham/styles.less
Using Operator Mono in Atom
View styles.less
/**
* Using Operator Mono in Atom
*
* 1. Open up Atom Preferences.
* 2. Click the “Open Config Folder” button.
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up.
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden!
* 5. Tweak away.
*
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png):
View foo.js
function task (fn) {
if (!fn.length) {
throw new Error('pass a callback arg')
}
fn(function (err, res) {
if (err) throw err
console.log('res', res)
})
}
@tunnckoCore
tunnckoCore / letta-power.md
Last active Jun 6, 2018
Ultimate and asynchronous control flow plugin system.
View letta-power.md

And btw, arguments passed to each plugin and their context are configurable through options.
All of this works and is reality.

app
  .use(function one (done) {
    this.one = 'one'
    // console.log('first:', this.one)
    // throw new Error('foo')
    fs.readFile('package.json', done)
@tunnckoCore
tunnckoCore / gist:366ef82335e12f586a54
Created Feb 4, 2016
Sublime Text 3 Build 3083 License Key - CRACK
View gist:366ef82335e12f586a54
### yo probe esta:
—– BEGIN LICENSE —–
J2TeaM
2 User License
EA7E-940282
45CB0D8F 09100037 7D1056EB A1DDC1A2
39C102C5 DF8D0BF0 FC3B1A94 4F2892B4
0AEE61BA 65758D3B 2EED551F A3E3478C
C1C0E04E CA4E4541 1FC1A2C1 3F5FB6DB