Skip to content

Instantly share code, notes, and snippets.

View asdf913's full-sized avatar

asdf913

  • Hong Kong
  • Hong Kong
View GitHub Profile
@eightyknots
eightyknots / avregex.md
Last active July 7, 2024 20:19
AvReg: Aviation regex match toolkit

AvReg: The Aviation RegEx Match Toolkit

General Tips

  • The PCRE flavour of RegEx is used here.
  • Append the i modifier to the end of the regex to make any pattern case-insensitive.

Aircraft

| Purpose | Description | RegEx | Example |

@t-mat
t-mat / win32-katakana-to-hiragana-conversion-by-lcmapstringex.cpp
Created February 19, 2015 05:02
Win32 : Katakana to Hiragana conversion by LCMapStringEx()
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tchar.h>
#include <wtypes.h>
#include <vector>
#include <string>
#include <iostream>
@janbaer
janbaer / request_password.ps1
Created June 26, 2013 08:53
Request a password with a masked password-dialog in powershell
$securestring = Read-Host -AsSecureString "Please enter your password"
$password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($securestring))
@cemerson
cemerson / gist:3455470
Created August 24, 2012 20:49
Other: PDF Expiration Script
var curDate = new Date();
var finalDate = new Date("6/25/2011");
if(finalDate.getTime() < curDate.getTime()){
app.alert("The customer license for this document has expired. Please contact Situational Leadership @ licensing@situational.com regarding customer ID: 123023234 for assistance.");
this.closeDoc(true);
}else{
var ocgs = this.getOCGs();
for(var i=0;i<ocgs.length;i++){
if(ocgs[i].name == "Watermark")
break;