Skip to content

Instantly share code, notes, and snippets.

View devlights's full-sized avatar
🤧
hay fever....

devlights devlights

🤧
hay fever....
View GitHub Profile
@voluntas
voluntas / webrtc.rst
Last active March 28, 2025 06:01
WebRTC コトハジメ
@smurn
smurn / paramiko291monkeypatch.py
Created July 17, 2014 09:04
Monkey patch for paramiko issue 291
"""
Add binary-mode options to SSHClient.exec_command(...) for binary stdout, stderr channels.
See: https://github.com/paramiko/paramiko/issues/291
"""
import paramiko
def _patched_exec_command(self,
@tekk555
tekk555 / gist:6249920
Last active December 21, 2015 04:29
XRDPのインストール。日本語対応。\_IMEに対応。Ubuntu Server 12.04 LTS。 要 Ubuntu Desktop。 xrdp 0.6
# とりあえず標準RPMをインストールする。後でコンパイルしたモジュールで上書きする。
$ sudo apt-get install xrdp
# コンパイルに必要なライブラリを追加
$ sudo apt-get install make
$ sudo apt-get install autoconf
$ sudo apt-get install libtool libtool-doc
$ sudo apt-get install libssl-dev
$ sudo apt-get install libpam0g-dev
$ sudo apt-get install libx11-dev and libxfixes-dev
@tekk555
tekk555 / km-e0010411.ini
Created August 16, 2013 12:39
XRDP用日本語キーボードレイアウトファイル http://www.mail-archive.com/[email protected]/msg00263.html
[noshift]
Key8=0:0
Key9=65307:27
Key10=49:49
Key11=50:50
Key12=51:51
Key13=52:52
Key14=53:53
Key15=54:54
Key16=55:55
@pocketberserker
pocketberserker / AsyncInCSharpAndFSharp.ja.rst
Last active October 6, 2022 02:53
Async in C# and F#: Asynchronous gotchas in C# (Japanese translation)

C# と F# の Async: C# の非同期の落とし穴

原文:Async in C# and F#: Asynchronous gotchas in C#
原文著者:Tomas Petricek (@tomaspetricek)
翻訳者:@pocketberserker

2月に、私は毎年恒例のMVPサミット ── Microsoft が MVP のために主催するイベント ── に出席しました。私はボストンとニューヨークを訪問する機会を利用して、二つの F# に関する講演と Channel9 lecture about type providers の収録を行いました。他のすべての活動(しばしばパブで他の F#er を議論に巻き込んだり、朝まで長い睡眠)にもかかわらず、私はいくつかの講演に参加し果せました。

@devlights
devlights / test.py
Last active August 10, 2022 03:00
Pythonでマルチバイト文字を扱う際に気をつける点。
# vim:fileencoding=utf-8
import codecs
import sys
import types
if __name__ == '__main__':
#
# ターミナルに出力する場合
# 以下のサンプルは、ターミナルに出力する場合は
# うまくいくが、リダイレクトさせてファイルに出力すると
@jtriley
jtriley / terminalsize.py
Created July 26, 2011 21:58
Get current terminal size on Linux, Mac, and Windows
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()