Skip to content

Instantly share code, notes, and snippets.

View tunnckoCore's full-sized avatar
🔒
Fighting for freedom, security and privacy 🔐

Charlike Mike Reagent tunnckoCore

🔒
Fighting for freedom, security and privacy 🔐
View GitHub Profile
@tunnckoCore
tunnckoCore / some-app.js
Last active October 2, 2017 21:52
Fractal & functional state management for unidirectional data flow, a la Elm in just 2kb
// 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 October 2, 2017 15:29
basic arithmetic memoization - failed try
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 August 17, 2017 23:14 — forked from BananaAcid/result
subdirs + includes
// ˫ 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
@tunnckoCore
tunnckoCore / get-user-packages.js
Created August 7, 2017 20:00
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 August 3, 2017 22:58 — forked from brandondurham/styles.less
Using Operator Mono in Atom
/**
* 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):
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 June 6, 2018 05:10
Ultimate and asynchronous control flow plugin system.

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 February 4, 2016 02:44
Sublime Text 3 Build 3083 License Key - CRACK
### 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
@tunnckoCore
tunnckoCore / How_to_use.html
Created January 24, 2016 03:01 — forked from jcgregorio/How_to_use.html
HTML Templating using the HTML <template> element and exactly 100 lines of JS. A cleaned up version of this code is now available at https://github.com/jcgregorio/stamp/.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="templating.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<template id=t>
@tunnckoCore
tunnckoCore / lyze-setup.sh
Created January 9, 2016 03:47
ArchLinux Openbox Minimal Desktop Setup (mate-panel or tint2 and few lx* packages)
#!/bin/bash
# helper script - Charlike Mike Reagent
# cleanup / autoremove
sudo pacman -Qdt && sudo pacman -Rnsc $(sudo pacman -Qdtq)
# packages count
sudo pacman -Q | wc -l
# list all user installed