This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' usage: start-app \path\to\foo.exe | |
' | |
Set args = WScript.Arguments | |
directory = get_directory(args(0)) | |
exe_name = get_filename(args(0)) | |
params = "" | |
' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun c () | |
(interactive) | |
(let ((cmd "C:\\Users\\g\\Dropbox\\apps\\ckw-mod-0.9.0-d2\\ckw-mod-0.9.0-d2\\ckw.exe") | |
(path (get-buffer-file-name)) | |
(opt "")) | |
(when path | |
(setq opt (concat " -cd \"" (directory-namestring path) "\""))) | |
(call-process (concat cmd opt) :wait nil))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'wsh argument test | |
For Each p in WScript.Arguments | |
wscript.echo p | |
Next |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'wsh argument test | |
If WScript.Arguments.Count > 0 then | |
wscript.echo WScript.Arguments(0) | |
End If |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' play dvd iso | |
' | |
' 1. mount iso (using WinCDEmu) | |
' 2. launch mpc and play | |
' 3. unmount iso | |
' | |
MOUNTER="""C:\Program Files (x86)\WinCDEmu\batchmnt64.exe""" | |
DVD_DRV="v:" | |
PLAYER="C:\Users\g\Dropbox\apps\MPC-HomeCinema.1.5.2.3456.x64\mpc-hc64.exe" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s = '^\\s*%s\\s*:\\s*(.+).*' | |
fields = ['vara', 'varb', 'varc', 'vard'] | |
conf = t_config() | |
for ln in lines: | |
for f in fields: | |
m = re.match(s % f, ln, re.IGNORECASE) | |
if m: | |
conf.__dict__[f] = m.group(1) # e.g. conf.vara = '100' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
Morpheous = "You take the blue pill and the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill, you stay in Wonderland, and I show you how deep the rabbit hole goes." | |
def which_do_you_choose(your_mind): | |
return 'red pill' if your_mind == 'believe' else 'blue pill' | |
def enter_the_matrix(): | |
while True: | |
for c in Morpheous: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
s = """xxxxx | |
Hello spam! | |
Hello Python! | |
yyyyy""" | |
match = re.search(r'^Hello (.*)$', s, re.MULTILINE) | |
for m in re.finditer(r'^Hello (.*)$', s, re.MULTILINE): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
using System.Collections; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Font] | |
Ascii=19,"Consolas",0 | |
Japanese=19,"MeiryoKe_Gothic",128 | |
Latin=17,"Courier New",0 | |
Cyrillic=17,"Courier New",0 | |
Greek=17,"Courier New",0 | |
GB2312=17,"MS Hei",0 | |
BIG5=18,"MingLiu",0 | |
KSC5601=18,"GulimChe",0 | |
Georgian=17,"BPG Courier New U",0 |