Skip to content

Instantly share code, notes, and snippets.

View mizdra's full-sized avatar

mizdra mizdra

View GitHub Profile
@whomwah
whomwah / server.tsx
Last active November 11, 2022 23:47
Deno / React example
// @deno-types="https://deno.land/x/types/react/v16.13.1/react.d.ts"
import React from "https://dev.jspm.io/react@16.13.1";
// @deno-types="https://deno.land/x/types/react-dom/v16.13.1/server.d.ts"
import ReactDOMServer from "https://dev.jspm.io/react-dom@16.13.1/server";
import { opine } from "https://deno.land/x/opine@0.3.0/mod.ts"
export {
Request,
Response,
NextFunction,
} from "https://deno.land/x/opine@0.3.0/src/types.ts";
@hushin
hushin / ghq.md
Last active May 6, 2023 14:33
ghq フォルダ整理

ghq フォルダ整理

ghq でリポジトリ管理していて、フォルダ整理したくなったので調べながら書いたコマンド集

そもそもgit管理してないフォルダを見つける

ghq root/github.com/hoge/fuga のような階層になっていること前提

@arccoza
arccoza / index.js
Last active March 20, 2024 15:12
JavaScript Callable Object using proxy
'use strict'
class Callable extends Function {
constructor() {
super()
return new Proxy(this, {
apply: (target, thisArg, args) => target._call(...args)
})
}

GoでISUCONを戦う話

mercari.go #4 https://mercari.connpass.com/event/105640/

自己紹介

  • catatsuyというIDで各種SNS活動しています
    • かたついって呼ばれています
  • メルカリのSREチームで主にGoを書いています
  • 前職はピクシブでpixivのHTTPS化・PHP7.1化・HTTP/2化や、広告サーバーの新機能追加など色々やっていました
@starhoshi
starhoshi / pokemongo.csv
Last active September 25, 2018 14:42
Pokemon Go Data
id number name name_ja type1 type2 hp attack defense max_cp form
0 1 Bulbasaur フシギダネ grass poison 90 118 118 981 normal
1 2 Ivysaur フシギソウ grass poison 120 151 151 1552 normal
2 3 Venusaur フシギバナ grass poison 160 198 198 2568 normal
3 4 Charmander ヒトカゲ fire 78 116 96 831 normal
4 5 Charmeleon リザード fire 116 158 129 1484 normal
5 6 Charizard リザードン fire flying 156 223 176 2686 normal
6 7 Squirtle ゼニガメ water 88 94 122 808 normal
7 8 Wartortle カメール water 118 126 155 1324 normal
8 9 Blastoise カメックス water 158 171 210 2291 normal
@focus97
focus97 / hack-your-own-slack-theme.md
Last active April 13, 2023 17:07
How to theme Slack (Dark, Solarized, White, Rosé, whatever)

How to theme Slack v4.12.0+

Update as of 8.08.2021:

  • Hid the bookmarks bar and fine-tuned some header styles.

If you want to add your own style to Slack, here's how.

My quazi-Tron Theme'ish?

I dunno what happened. I just wanted to try something sporty/future-y, I guess. Code for this is directly below.

@rosskevin
rosskevin / hoc-template.tsx
Last active August 23, 2020 19:44
Typescript higher order component (hoc) template
/* variation on https://medium.com/@DanHomola/react-higher-order-components-in-typescript-made-simple-6f9b55691af1 */
import * as React from 'react'
import { wrapDisplayName } from 'recompose'
// Props you want the resulting component to take (besides the props of the wrapped component)
interface ExternalProps {}
// Props the HOC adds to the wrapped component
export interface InjectedProps {}
[Unit]
Description=Keep reverse portforward tunnel
After=network.target
[Service]
User=root
Restart=always
RestartSec=5
Type=simple
ExecStart=/usr/bin/ssh -NTv \
from z3 import BitVec, Solver
from subprocess import Popen, PIPE
seed = "B65DD562AAEA877BA21332BC2A782A76"
status = [seed[i * 8:(i + 1) * 8] for i in range(4)][::-1]
p = Popen(['./tiny_mt'] + status, stdout=PIPE)
TINYMT32_MASK = 0x7fffffff
TINYMT32_SH0 = 1
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.