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 / 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 / PostController.php
Created March 31, 2014 06:29
Laravel 基礎 Lesson 6 - RESTful (app/controllers/PostController.php)
<?php
class PostController extends BaseController{
function create(){
return View::make('posts.create');
}
function store(){
DB::table('posts')->insert([
'title'=>Input::get('title'),
'body'=>Input::get('body')
@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
@Rokt33r
Rokt33r / config.json
Created April 11, 2016 01:35
sublime config
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"node_modules/*",
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
@Rokt33r
Rokt33r / gist:ea47e184f90b09474f51
Last active December 2, 2015 09:21
A humble start

A humble start

Electronはどういうものなのかと実際に簡単な例題を作ってみる。

1. Install electron-prebuilt

npm i -g electron-prebuilt
@Rokt33r
Rokt33r / 2015-1.py
Last active October 29, 2015 04:05
誘導制御課題1
import numpy as np
from math import *
dt = 0.1
a11 = (2 * e ** -dt) - (e ** -(2 * dt))
a12 = (e ** -dt) - (e ** -(2 * dt))
a21 = (-2 * e ** -dt) + (2 * e ** -(2 * dt))
a22 = (-e ** -dt) + (2 * e ** -(2 * dt))
@Rokt33r
Rokt33r / cors.xml
Created June 1, 2015 12:36
S3 Set up
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>http://localhost:8000</AllowedOrigin>
<AllowedMethod>HEAD</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>