Skip to content

Instantly share code, notes, and snippets.

@kiddpt
kiddpt / download-csv
Last active February 14, 2022 13:16
Fast and easy CSV download by streaming for node-express
var csv = require('fast-csv');
var mysql = require('mysql');
var connection = mysql.createConnection(config.mysql);
var pool = mysql.createPool({
connectionLimit: 10,
host: config.mysql.host,
user: config.mysql.user,
password: config.mysql.password,
@jNizM
jNizM / gist:b0b35f621134fa742f50
Created February 23, 2015 10:16
[AHK] AES Encryption + ECB / CBC
; ===============================================================================================================================
; http://aes.online-domain-tools.com/
; Input Text : Hello World!1234 (Plaintext)
; Function : AES
; Mode : ECB (electronic codebook)
; Key : 12345678901234567890123456789012 (Plaintext)
; Init. vector : -
; OUTPUT : 17 C3 BA 4F 85 24 49 DD 7A 6C E9 20 99 EB 70 61 41 98 AB 40 81 48 7C 21 3A 1C 82 BC 40 4A D7 C8
; ===============================================================================================================================
@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,其它相异于此运行环境的,请自行测试脚本兼容性问题
版权申明: 非商业使用,在此脚本基础上所作出的修改,需保留原作者署名信息(作者名和官网链接)
@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);
@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
; ===============================================================================================================================
'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":
;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
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"}
@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
@spikebike
spikebike / client.go
Created March 29, 2012 01:13
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)