Skip to content

Instantly share code, notes, and snippets.

View GitHub30's full-sized avatar
🌴
On vacation

GitHub30

🌴
On vacation
  • Osaka, Japan
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.viewport {
width: 160px;
overflow-x: hidden;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<textarea name="" id="" cols="30" rows="10">{"hello": "world"}</textarea>
<a download="hoge.json" onclick="doDownload(this)">download</a>
@GitHub30
GitHub30 / death_march.md
Created May 7, 2018 04:55 — forked from voluntas/death_march.md
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ) @bluecrow2

これは結城浩さんの YukiWiki 運用停止で消えてしまった http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 に存在していた文章のバックアップです。 自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。

もし図を保存されていた方いらっしゃいましたら、 Gist にコメントを頂けると嬉しいです。

この記事に対してなにかある場合はこの Gist にコメントをお願いします。

@GitHub30
GitHub30 / play-with-docker.sh
Last active July 10, 2018 20:20 — forked from humbertodias/gist:3138cf7753b6814d37b606764fb9efaf
Exporting Mysql server to internet
# port forwarding(-p 3306:3306) required
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7 # play with docker (https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded/49944625#49944625#answer-49944625 for mysql8)
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
# tunnel online(free authtoken required)
./ngrok tcp 3306
# In local
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Speech Recording</title>
</head>
<body>
<script>
#!/usr/bin/env python
# coding: utf-8
import tweepy
import tw_key
CONSUMER_KEY = tw_key.twdict['cons_key']
CONSUMER_SECRET = tw_key.twdict['cons_sec']
ACCESS_TOKEN_KEY = tw_key.twdict['accto_key']
ACCESS_TOKEN_SECRET = tw_key.twdict['accto_sec']
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import math
import random
import chainer
import chainer.functions as F
import chainer.links as L
import numpy as np
from chainer import reporter
@GitHub30
GitHub30 / turbo_colormap.py
Created August 20, 2019 17:02 — forked from mikhailov-work/turbo_colormap.py
Turbo Colormap Look-up Table
# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# Author: Anton Mikhailov
turbo_colormap_data = [[0.18995,0.07176,0.23217],[0.19483,0.08339,0.26149],[0.19956,0.09498,0.29024],[0.20415,0.10652,0.31844],[0.20860,0.11802,0.34607],[0.21291,0.12947,0.37314],[0.21708,0.14087,0.39964],[0.22111,0.15223,0.42558],[0.22500,0.16354,0.45096],[0.22875,0.17481,0.47578],[0.23236,0.18603,0.50004],[0.23582,0.19720,0.52373],[0.23915,0.20833,0.54686],[0.24234,0.21941,0.56942],[0.24539,0.23044,0.59142],[0.24830,0.24143,0.61286],[0.25107,0.25237,0.63374],[0.25369,0.26327,0.65406],[0.25618,0.27412,0.67381],[0.25853,0.28492,0.69300],[0.26074,0.29568,0.71162],[0.26280,0.30639,0.72968],[0.26473,0.31706,0.74718],[0.26652,0.32768,0.76412],[0.26816,0.33825,0.78050],[0.26967,0.34878,0.79631],[0.27103,0.35926,0.81156],[0.27226,0.36970,0.82624],[0.27334,0.38008,0.84037],[0.27429,0.39043,0.85393],[0.27509,0.40072,0.86692],[0.27576,0.41097,0.87936],[0.27628,0.42118,0.89123],[0.27667,0.43134,0.90254],[0.27691,0.44145,0.913
@GitHub30
GitHub30 / decryptchromecookies.py
Last active April 4, 2024 09:08
Simple Decrypt Chrome/Firefox Cookies File (Python 3) - Windows
import sqlite3
def get_chrome_cookies(db=None):
import json
from base64 import b64decode
from win32.win32crypt import CryptUnprotectData # pip install pywin32
# should use Cryptodome in windows instead of Crypto
# otherwise will raise an import error
from Cryptodome.Cipher.AES import new, MODE_GCM # pip install pycryptodomex
@GitHub30
GitHub30 / hclustering.py
Created February 6, 2022 15:15 — forked from codehacken/hclustering.py
Agglomerative clustering using Scikit-Learn (with a custom distance metric)
"""
Hierarchial Clustering.
The goal of gist is to show to use scikit-learn to perform agglomerative clustering when:
1. There is a need for a custom distance metric (like levenshtein distance)
2. Use the distance in sklearn's API.
Adapted from: sklearn's FAQ.
http://scikit-learn.org/stable/faq.html
"""