Skip to content

Instantly share code, notes, and snippets.

View yuiseki's full-sized avatar
🍻
I want to drink

yuiseki yuiseki

🍻
I want to drink
View GitHub Profile
@yuiseki
yuiseki / rfc-scrapbox.py
Last active October 17, 2020 05:03
IETFのRFCをScrapboxにimportできるJSONにするスクリプト
import requests
import json
import time
import re
from datetime import datetime, timedelta
base_url = "https://www.ietf.org/ietf-ftp/rfc/"
numrange = range(1, 500)
scrapbox_json = {'pages':[]}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Created by Hari Seldon and modified by orangain and Integrated by yuiseki.
Licensed under Creative Commons Attribution-Share Alike 3.0 Unported.
See: https://creativecommons.org/licenses/by-sa/3.0/deed.en
Original file is available at: https://commons.wikimedia.org/wiki/File:Shogi_kinsho(svg).svg
Separate SVG is available at: https://github.com/orangain/shogi-piece-images
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yuiseki
yuiseki / build.sh
Created February 25, 2015 09:02
XCodeでipaの出力がうまく行かない時に、最新っぽいarchivesからipaを無理やり生成するスクリプト
ipa_base="debug"
ipa_ext=".ipa"
profile="iOSTeam Provisioning Profile: *"
archives="/Users/$USER/Library/Developer/Xcode/Archives/"
newest_dir=`ls -lt $archives|head -n 2|tail -n 1|cut -f 13- -d " "`
echo $newest_dir
newest_ipa=`ls -lt $archives$newest_dir|head -n 2|tail -n 1|cut -f 13- -d " "`
import json
from jsonschema import ValidationError, exceptions
from jsonschema.validators import Draft3Validator
from functools import wraps
from flask import _request_ctx_stack, request, jsonify
def _validate(schema, data):
reqv = Draft3Validator(schema)

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing

@yuiseki
yuiseki / cpufreqd.conf
Created July 20, 2013 18:39
/etc/cpufreqd.conf
# this is a comment
# see CPUFREQD.CONF(5) manpage for a complete reference
#
# Note: ondemand/conservative Profiles are disabled because
# they are not available on many platforms.
[General]
pidfile=/var/run/cpufreqd.pid
poll_interval=2
verbosity=4
# node v0.10.10
crypto = require "crypto"
secretKey = [
0xff, 0x03, 0x44, 0x89, 0xd6, 0xf8, 0x98, 0x21,
0x1f, 0xad, 0xaa, 0xda, 0x39, 0x9d, 0x3f, 0x8e,
0xbc, 0xd5, 0xa1, 0x00, 0xe1, 0x36, 0xfa, 0xcc,
0xe7, 0x48, 0x0a, 0x0e, 0x44, 0x1c, 0xf6, 0xaf,
]
secretKeyBuf = new Buffer(secretKey)
# node v0.10.10
crypto = require "crypto"
secretKey = [
0xff, 0x03, 0x44, 0x89, 0xd6, 0xf8, 0x98, 0x21,
0x1f, 0xad, 0xaa, 0xda, 0x39, 0x9d, 0x3f, 0x8e,
0xbc, 0xd5, 0xa1, 0x00, 0xe1, 0x36, 0xfa, 0xcc,
0xe7, 0x48, 0x0a, 0x0e, 0x44, 0x1c, 0xf6, 0xaf,
]
secretKeyBuf = new Buffer(secretKey)