Skip to content

Instantly share code, notes, and snippets.

View Rokt33r's full-sized avatar
🧨
BOOM!

Junyoung Choi Rokt33r

🧨
BOOM!
View GitHub Profile
@Rokt33r
Rokt33r / lang.json
Created May 15, 2019 01:13
lang.json
[
"1C Enterprise",
"ABAP",
"ABNF",
"AGS Script",
"AMPL",
"ANTLR",
"API Blueprint",
"APL",
"ASN.1",
@Rokt33r
Rokt33r / readme.md
Last active August 19, 2017 14:49
Map performance comparison
Get Nth
Native Object(10) : 22670660.07 +/- 2.14% op/s
Native Map(10) : 22534378.75 +/- 0.93% op/s
Hashtrie(10) : 13052298.01 +/- 0.99% op/s
Hamt(10) : 13362491.37 +/- 0.78% op/s
Hamt+(10) : 13020559.46 +/- 0.73% op/s
Mori(10) : 9405100.99 +/- 2.80% op/s
Immutable(10) : 12250139.06 +/- 2.92% op/s
Native Object(100) : 31386478.91 +/- 1.57% op/s
Native Map(100) : 17021320.51 +/- 1.36% op/s
@Rokt33r
Rokt33r / run-twice.spec.ts
Last active July 3, 2017 02:22
Async Saga test
import {
createSaga
} from '../lib'
import {
createStore,
applyMiddleware,
} from 'redux'
import {
PureAction,
createActionCreator,
@Rokt33r
Rokt33r / broken-route-switch.jsx
Last active June 12, 2017 14:45
ReactRouter is BROKEN!!
import React from 'react'
import styled from 'styled-components'
import {
Switch,
Route,
Redirect
} from 'react-router-dom'
import RepoListPage from './pages/repos/list/ReposListPage'
import ReposNewPage from './pages/repos/new/ReposNewPage'
import PreferencesPage from './pages/preferences/PreferencesPage.js'
@Rokt33r
Rokt33r / linkDir.js
Created May 7, 2017 09:45
Link Directory
const fs = require('fs')
const path = require('path')
const moduleMap = [
'base'
]
function link (modulePath) {
const sourcePath = path.join(__dirname, '..', modulePath)
const targetPath = path.join(__dirname, '../node_modules', modulePath)
@Rokt33r
Rokt33r / IssueCommentContainer.jsx
Last active May 7, 2017 07:52
Saga in Component
import React from 'react'
import CommentList from './CommentList'
import api from '../../lib/api'
import { bindActionCreators } from 'redux'
import TechReactor from '../shared/TechReactor'
const statusPrefix = 'IssueCommentContainer'
// Action types
const REQUEST_COMMENT_CREATE = `${statusPrefix}/REQUEST_COMMENT_CREATE`
@Rokt33r
Rokt33r / katex-fix.css
Created February 21, 2017 19:30
KaTeX temporary fix
/* Temporary fix for \frac and subscript */
.katex .frac-line {
top: 0.85em;
position: relative;
}
.katex .reset-textstyle.scriptstyle {
top: 0.4em;
position: relative;
}
@Rokt33r
Rokt33r / ast.json
Created February 18, 2017 08:47
Unknown MDAST nodes are not compiled to DIV
{
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Inline math! ",
"position": {
@Rokt33r
Rokt33r / .js
Created September 25, 2016 14:24
got download pipe
'use strict'
const got = require('got')
const fs = require('fs')
const path = require('path')
let beta = fs.readFileSync(path.join(__dirname, 'beta.json'))
beta = JSON.parse(beta)
let data = []
for (let key in beta) {
@Rokt33r
Rokt33r / find-by-key.js
Last active August 26, 2016 11:13
find-by-key
var crypto = require('crypto')
function keygen () {
return crypto.randomBytes(6).toString('hex')
}
var _ = require('lodash')
var arr = []
for (var i = 0; i < 1000; i++) {
arr.push({
key: keygen(),
index: i