Skip to content

Instantly share code, notes, and snippets.

@matvore
matvore / expand_codes
Created February 24, 2016 17:25
ほー連想のコードをSTDOUTに出力
#!/usr/bin/perl
# Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
pri 5 - 4471 assigned (92.99%), 337 unassigned, 4808 total:
舀墀玀     舨榨抨暨玨皂舢蜢焊墊搪挪漪謊
蛀蓀    弈   麂捂懂飪壢鎢婊烊鎊鎂躂踢
絀撐邐砰筠鈐闈碘砸   埂 渲媲鏢  睪颺 
   胰   瘸嬸  扒 鐲    拚   
    擰 姘 荸菸摒 賒籲     蹺  
 犄掄   娌銬尬撬  梆氦    鐮氮 殮
  夤嬤疤塌桌瞄圬瞌崆徬賬蹬惦蹦  拎 垮妮
舔罄  囤 闆迆睬臬捆彆跆 跎翎捎旎盎籮 涮
夔攔 嬴渴趴璜  銼脖挖氖錶颼騖搞妞螞鈾  
pri 5 - 4485 assigned (93.28%), 323 unassigned, 4808 total:
舀 玀     舨抨暨榨玨皂舢焊蜢搪挪漪謊
蛀蓀   弈    捂懂麂飪鎢烊婊鎊鎂躂踢
絀撐砰筠邐鈐碘闈瘸砸  鐲渲媲鏢  睪颺 
   胰    嬸 扒      拚   
   擰  姘 荸菸摒賒 籲    蹺  
 犄掄嬤 娌 尬撬銬 梆 氦  鐮涮氮妮殮
  瞄疤 桌 瞌臬徬崆捆賬蹦惦捎蹬拎盎籮 
舔罄 渴騖颼闆銼睬跆氖彆迆 跎搞旎翎鈾  
攔 遴嬴拴趴璜鼴紼龔挖牖脖錶  妞螞   
pri 5 - 4504 assigned (93.68%), 304 unassigned, 4808 total:
舀 玀     舨抨暨榨玨皂舢焊蜢搪挪漪謊
蛀蓀   弈    捂懂 麂飪鎢烊鎊鎂躂踢
絀撐砰筠邐鈐碘闈瘸砸  鐲渲鏢   睪颺 
   胰      扒      拚   
   擰    荸菸摒賒 籲    蹺  
 犄掄     撬銬 梆 氦   鐮氮涮殮
  瞄疤 桌 瞌臬徬崆捆賬蹦惦捎蹬拎盎籮 
舔罄 渴騖颼闆銼睬跆氖彆迆 跎搞旎翎鈾  
攔 遴鼴拴趴璜龔紼 挖牖脖錶   螞   
pri 5 - 4511 assigned (93.82%), 297 unassigned, 4808 total:
舀玀     舨榨抨暨玨皂舢焊蜢搪挪漪謊
蛀蓀 筠     捂懂麂飪鏢鎢烊鎊鎂躂踢
絀撐砰邐鈐闈碘瘸砸  鐲 渲   睪颺 
  胰擰     摒扒賒    拚蹺  
 犄     荸菸銬 梆籲       
瞄掄 疤 桌瞌 撬徬  氦惦 鐮拎氮涮殮
        臬賬捆跆蹦蹬迆捎旎盎籮跎
舔罄闆渴銼脖璜睬氖挖彆 錶 搞 翎鈾  
摔攔湔盔拴趴軔慼紼盼牖遴陴颼騖鱔螞鱖鼴龔
pri 5 - 4543 assigned (94.49%), 265 unassigned, 4808 total:
舀玀     舨暨榨玨皂舢焊蜢謊漪踢躂
蛀蓀 筠      懂 麂鏢烊飪鎢鎊鎂
絀邐砰鈐 闈碘瘸砸  鐲渲   睪颺 
   胰   荸菸 賒籲    蹺  
 犄      銬 梆氦   鐮氮  
 瞄 疤桌蹬瞌賬徬  蹦惦    涮殮
罄舔     睬臬彆跆迆銼闆旎盎籮翎跎
龔鼴趴渴 璜 紼脖氖 錶   螞騖颼鈾
湔盔軔燴煜燜慼睜盼牖旖轔遴鏜睞陴靶饜篾
@matvore
matvore / gist:1fe576898b7cc42aa0cf41d102d0cc99
Created October 5, 2017 17:17
hg log -G -r "branch(default)"
$ hg log -G -r "branch(default)" (first 40 lines)
@ changeset: 3359:488c9223c1ad
| tag: tip
| parent: 3349:2d42bd025754
| user: Matt DeVore <[email protected]>
| date: Tue Oct 03 11:14:29 2017 -0700
| summary: obscache: do not check of argument count of wrapped function
|
| o changeset: 3358:7def8adf53d6
| | user: Pulkit Goyal <[email protected]>
$ hg outgoing
comparing with https://bitbucket.org/octobus/evolve-devel
searching for changes
changeset: 2633:fc64028a3dc0
user: Pulkit Goyal <[email protected]>
date: Tue Jul 04 17:10:21 2017 +0530
summary: prev: factor out the logic to update to previous commit to a new function
changeset: 2634:0ba8ae0ced24
user: Pulkit Goyal <[email protected]>
@matvore
matvore / foo.java
Last active August 20, 2018 17:19
Demonstrate encoding with ASCII and UTF-8
import java.io.*;
public final class foo {
public static void main(String[] args) throws Exception {
byte b[] = {(byte) 0x80, (byte) 0xe3, (byte) 0x81, (byte) 0xbb};
ByteArrayInputStream is = new ByteArrayInputStream(b);
Reader r = new InputStreamReader(is, "ASCII");
System.out.println("ASCII:");
while (true) {
int c = r.read();
<!doctype html>
<html>
<head>
<title>js-keygen</title>
<script>
// adapted from https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-08#appendix-C
function base64urlEncode(arg) {
const step1 = window.btoa(arg); // Regular base64 encoder