Skip to content

Instantly share code, notes, and snippets.

View toshiyukino's full-sized avatar

toshiyukino toshiyukino

View GitHub Profile
@toshiyukino
toshiyukino / jpaketest.c
Last active December 24, 2015 18:19
Nginxのコンパイルに openssl-1.0.1e を使ったら「md2test.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token」になるので回避策。 http://stackoverflow.com/questions/7256087/error-compiling-openssl-with-mingw-msys より
/* dummytest.c */
#include "dummytest.c"
hello world
# windowsでcurlのproxyを通す場合、 --proxy や --proxy-userをコマンドラインで指定する以外にも
# .curlrc で指定することもできるらしい。
# ただし、ファイル名を _curlrc としなければならない。
# curl.exe と同じディレクトリ内かホームディレクトリに保存
proxy=http://proxy.example.com:8080/
proxy-user=username:password
@toshiyukino
toshiyukino / cygwinccompiler.py.diff
Last active December 29, 2015 15:09
windowsのsetup.pyでgccエラーになったので調べたらこんな感じでできた。
--- cygwinccompiler.py Thu Nov 28 15:47:59 2013
+++ cygwinccompiler.py_org Tue Mar 8 09:43:14 2011
@@ -319,11 +319,11 @@
else:
entry_point = ''
- self.set_executables(compiler='gcc -O -Wall',
- compiler_so='gcc -mdll -O -Wall',
- compiler_cxx='g++ -O -Wall',
- linker_exe='gcc ',
@toshiyukino
toshiyukino / gist:7702360
Last active December 29, 2015 17:09
wshやvbscriptからクリップボードへデータを入れてみた。
Sub ClipBordTest()
Dim obj
Set obj = CreateObject("htmlfile")
obj.parentWindow.clipboardData.setData "text", "クリップボードに入れてみるよ。"
End Sub
@toshiyukino
toshiyukino / gist:7801610
Created December 5, 2013 07:46
gistのdiffのシンタックスをCSSで調べたのでメモ
gistのCSSみたら
diffの + は rgb(221, 255, 221)
diffの - は rgb(255, 221, 221)
@@のとこは #800080 になってた。
@toshiyukino
toshiyukino / gist:7819403
Created December 6, 2013 06:23
VBAでユニコードエスケープされた文字を復元.意外と短くできた
Sub test()
Set re = CreateObject("VBScript.RegExp")
re.Pattern = "\\u([a-fA-F0-9]{4})"
re.Global = True
re.IgnoreCase = True
re.MultiLine = True
a = "\u3042\u3044\u3046\u3048\u304A" 'あいうえお
Set mc = re.Execute(a)
For Each m In mc
For Each s In m.submatches
@toshiyukino
toshiyukino / gist:7938831
Last active December 31, 2015 05:09
VBAでソケット通信初期化テスト
Private Declare Function WSAStartup Lib "ws2_32.dll" _
(ByVal wVersionRequested As Long, _
ByRef lpWSAData As WSADataType) As Long
Private Const WSA_DESCRIPTIONLEN As Long = 256
Private Const WSA_DESCRIPTIONSIZE As Long = WSA_DESCRIPTIONLEN + 1
Private Const WSA_SYS_STATUS_LEN As Long = 128
Private Const WSA_SYSSTATUSSIZE As Long = WSA_SYS_STATUS_LEN + 1
Private Type WSADataType
wVersion As Integer
wHighVersion As Integer
@toshiyukino
toshiyukino / gist:8048833
Created December 20, 2013 00:55
パソコンを入れ替えてもVBAのデータが無くなっていなかったので調べた
パソコンを変えてもVBAのデータが引きつかれてたので何でかなと
思ってしらべたら、データファイルで存在されていることがわかったのでメモ。
※ %HOMEPATH%をバックアップして新しいパソコンで復元した場合の話。
Microsoftのページ(古い)
http://msdn.microsoft.com/ja-jp/library/cc344607.aspx
実態は「VbaProject.OTM」らしい
・Windows 7
@toshiyukino
toshiyukino / gist:8050617
Created December 20, 2013 05:09
証明書ってcurlのサイトからとれるのか。
curl http://curl.haxx.se/ca/cacert.pem -o ca-bundle.crt