Skip to content

Instantly share code, notes, and snippets.

@glacjay
glacjay / tun-ping-win.py
Created September 19, 2010 16:24
Reading/Writing OpenVPN's TUN/TAP Device under Windows using Python.
import _winreg as reg
import win32file
adapter_key = r'SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}'
def get_device_guid():
with reg.OpenKey(reg.HKEY_LOCAL_MACHINE, adapter_key) as adapters:
try:
@tomoh1r
tomoh1r / DeleteUTF8Bom.vbs
Created January 14, 2012 15:43
UTF-8 の BOM を削除する VBScript
Option Explicit
' ==================================================================================
' UTF-8 のファイルのBOMを削除するVBScript
' ファイルをドラッグ&ドロップして利用する。
' 2012/01/14 Nakamura, Tomohiro
' This Software is under CC0
' ADODB の為、要Excel
' ==================================================================================
Dim adTypeBinary, adTypeText, adSaveCreateOverWrite
@spikebike
spikebike / client.go
Created March 29, 2012 01:13
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@kenichiro22
kenichiro22 / SendMailBySES.vbs
Created March 29, 2012 05:55
Amazon SESを使ってメールを送信する
Set message = CreateObject("CDO.Message")
message.From = "[email protected]"
message.To = "[email protected]"
message.Subject = "件名"
message.TextBody = "本文。"
message.TextBodyPart.Charset = "ISO-2022-JP"
Const schemas = "http://schemas.microsoft.com/cdo/configuration/"
message.Configuration.Fields.Item(schemas + "sendusing") = 2
message.Configuration.Fields.Item(schemas + "smtpconnectiontimeout") = 30
SetTitleMatchMode 2
MsgBox % Acc_Get("Value", "4.20.2.4.2", 0, "Firefox")
MsgBox % Acc_Get("Value", "application1.property_page1.tool_bar2.combo_box1.editable_text1", 0, "Firefox")
Acc_Get(Cmd, ChildPath="", ChildID=0, WinTitle="", WinText="", ExcludeTitle="", ExcludeText="") {
static properties := {Action:"DefaultAction", DoAction:"DoDefaultAction", Keyboard:"KeyboardShortcut"}
;If you are experiencing some wierd behavior with the script (exp. doesn't pick the right abilities) = increase this value -> to 100 or higher
delay := 50
#Include %A_ScriptDir%\lib\diablo3_func.ahk
#Include %A_ScriptDir%\lib\diablo3_get_talentbuild.ahk
#NoEnv
#SingleInstance force
'This function is intended to make it a little easier to add images to emails when sending them
' through CDOSYS (CDO.Message). If all the following are true, this may help:
' - You want to send an HTML email, with one or more images in the email body
' - You want the images to be in the email itself, so that they display without any security or privacy warnings
' - You don't want the images to show up explicitly as "Attachments" in email clients like Microsoft Outlook
' - You don't want to use the images to "track" who has read your emails (that requirement would be incompatible with the rest)
' - You are using VBScript (ASP, WSH) or Office Visual Basic for Applications (VBA), or Visual Basic 6 (VB6)
'
' This code is loosely based on a collection of prior resources/examples online:
' - VBS/VBA versions using "AddRelatedBodyPart":
@jNizM
jNizM / gpu_memory_info.ahk
Last active May 16, 2019 17:36
[AHK] NVIDIA Graphics Memory Size and Usage in OpenGL
; ===============================================================================================================================
; Title .........: GPU_MEMORY_INFO
; AHK Version ...: 1.1.15.01 x64 Unicode
; Win Version ...: Windows 7 Professional x64 SP1
; Description ...: GPU_MEMORY_INFO
; NVIDIA Graphics Memory Size and Usage in OpenGL
; Version .......: v1.00
; Modified ......: 2014.06.27-2150
; Author(s) .....: jNIzM
; ===============================================================================================================================
@maximilianschmitt
maximilianschmitt / jobs.js
Created September 3, 2014 23:47
Automated MySQL backups to S3 with node.js
'use strict';
var mysqlBackup = require('./mysql-backup');
var schedule = require('node-schedule');
schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup);
@ycrao
ycrao / LOL_CG_Picture_Downloader.ahk
Created September 15, 2014 05:16
英雄联盟全英雄原画壁纸下载器
/*
脚本名称: LOL_CG_Picture_Downloader
脚本编码: UTF-8(with BOM)
脚本说明: 英雄联盟全英雄原画壁纸下载器
脚本版本: 1.0
脚本作者: 飞扬网络工作室 (fysoft)
作者官网: http://raoyc.com/fysoft/
交流Q群: 260655062
运行环境: 作者在编码或测试此脚本时所使用的运行环境为 Windows XP SP3 + AutoHotkey(L) v1.1.09.04,其它相异于此运行环境的,请自行测试脚本兼容性问题
版权申明: 非商业使用,在此脚本基础上所作出的修改,需保留原作者署名信息(作者名和官网链接)