Skip to content

Instantly share code, notes, and snippets.

View rane-hs's full-sized avatar

Hiroshi Seki rane-hs

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rane-hs on github.
  • I am rane_hs (https://keybase.io/rane_hs) on keybase.
  • I have a public key ASAHUPwH_xR5HtavtVS7gtXFU6sPZJ5GYMRQcqj24StkAAo

To claim this, I am signing this object:

@rane-hs
rane-hs / sandbox.md
Created September 12, 2018 10:22
たぶんアスタルテよう

h1

  • hyphen 1-1
    • hyphen 1-2
  • plus 2-1
    • plus 2-2
  • asterlisk 3-1
    • asterlisk 3-2

h2

  • checkbox
@rane-hs
rane-hs / mimetools.py
Last active May 8, 2018 04:05
python3 choose_boundary
import os
# Utility functions
# -----------------
try:
import _thread
except ImportError:
import _dummy_thread as _thread
_counter_lock = _thread.allocate_lock()
@rane-hs
rane-hs / uwsgi-and-nginx.md
Created October 13, 2017 03:25 — forked from pcostesi/uwsgi-and-nginx.md
uWSGI and NGiNX
import sys
import socket
_term = ''
if sys.version_info.major >= 2:
_term = b''
content = sys.stdin.read()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('127.0.0.1', int(sys.argv[1])))
s.sendall(content)
@rane-hs
rane-hs / test.py
Created May 23, 2016 11:27
cryptography sample.py
pkey_string = """
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEArphwgCaBh25XhkszCHSr/ElQY7e2lM8x2HY1CzoZYFdrCnN3
Bhta+q1itSNyacXbCTa1boLeoHNjlBe0RS1wA0iz6jyoh50APigPlY6V6raxdbWf
siVLPLeo75l4lEOP6IPSEBsY+LO6bhvQUQawSRA6EHfM9g8nBNZgS80aOnhj/xV+
j2LL+heLjHkWng8tMJrKIV+rv4j9bs8Q3uls2p3mBT5Glqyuzo0FFZQfEl1qGI29
LnfTTrUIEqhb1tG6TO+kMwiHEmDxvC24bbQvk4Msxw9axDIhEvbqLcTFfacozjGb
Vn29ebqtUhhxzz7kOY/zJ0zA1ULCgQxjC2tDVwIDAQABAoIBAD2o9mo7rxkOPfje
i+pbkfWqSqq80c1iEx94N6l8XkPo+5OYTZupg4ruOuLv3tM+Hen2GUMrEsalmbBO
YsrfjiSKw4dg3r/uEYziBwbxcT6QQMHqX7jBdP2/evkLQUtTRPp/u2sWts32Y0vJ
@rane-hs
rane-hs / test.ipynb
Created August 19, 2015 08:49
ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rane-hs
rane-hs / hlds_czero.md
Last active August 29, 2015 14:04
hlds czero
@rane-hs
rane-hs / 犬小屋python.py
Last active December 28, 2015 20:59
犬小屋python 雑
import urllib2
import json
cp_url = "http://melpon.org/wandbox/api/compile.json?"
list_url = "http://melpon.org/wandbox/api/list.json"
compilation_list = {}
def get_type(ext):
response = urllib2.urlopen(list_url)
@rane-hs
rane-hs / nana_x64.patch
Created December 19, 2011 07:52
nana for x64 (for msvc10)
--- C:/cpplib/nana/source/gui/cursor.cpp.bkp Tue Dec 13 19:37:44 2011
+++ C:/cpplib/nana/source/gui/cursor.cpp Mon Dec 19 15:49:01 2011
@@ -60,8 +60,13 @@
{
#if defined(NANA_WINDOWS)
const nana::char_t *idstr = translate(id);
+#ifdef _WIN64
+ ::SetClassLongPtr(reinterpret_cast<HWND>(wd), GCLP_HCURSOR,
+ static_cast<unsigned long>(reinterpret_cast<size_t>(::LoadCursor(0, idstr))));
+#else