Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
愚公移山(The foolish old man removes the mountains)

Junyoung Choi Rokt33r

🐢
愚公移山(The foolish old man removes the mountains)
View GitHub Profile
View lang.json
[
"1C Enterprise",
"ABAP",
"ABNF",
"AGS Script",
"AMPL",
"ANTLR",
"API Blueprint",
"APL",
"ASN.1",
@Rokt33r
Rokt33r / readme.md
Last active Aug 19, 2017
Map performance comparison
View readme.md
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 Jul 3, 2017
Async Saga test
View run-twice.spec.ts
import {
createSaga
} from '../lib'
import {
createStore,
applyMiddleware,
} from 'redux'
import {
PureAction,
createActionCreator,
@Rokt33r
Rokt33r / broken-route-switch.jsx
Last active Jun 12, 2017
ReactRouter is BROKEN!!
View broken-route-switch.jsx
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'
View linkDir.js
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)
View IssueCommentContainer.jsx
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 Feb 21, 2017
KaTeX temporary fix
View katex-fix.css
/* 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 Feb 18, 2017
Unknown MDAST nodes are not compiled to DIV
View ast.json
{
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Inline math! ",
"position": {
@Rokt33r
Rokt33r / .js
Created Sep 25, 2016
got download pipe
View .js
'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) {
View find-by-key.js
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
You can’t perform that action at this time.