View soft-layers.ahk
This file contains 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
#inputlevel,2 | |
; Esc | LCtrl | |
$LCtrl:: | |
SetMouseDelay -1 | |
Send {Blind}{LCtrl DownR} | |
KeyWait, LCtrl | |
Send {Blind}{LCtrl up} | |
; MsgBox, %A_ThisHotkey%-%A_TimeSinceThisHotkey% | |
if (A_ThisHotkey="$LCtrl" and A_TimeSinceThisHotkey < 250) |
View youtube_playlist_cleaner.user.js
This file contains 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
// ==UserScript== | |
// @name youtube playlist cleaner | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description add a filter button to filter out watched videos | |
// @author GlacJAY <glacjay@gmail.com> | |
// @match https://www.youtube.com/playlist?list=* | |
// @grant none | |
// ==/UserScript== |
View wubi86_single.py
This file contains 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
# forked from https://github.com/yekingyan/rime-wubi-86-single/blob/master/wubi86_single.py | |
import re | |
INPUT_FILE_PATH = "wubi86.dict.yaml" | |
OUTPUT_FILE_PATH = "wubi86.dict.yaml.single" | |
View IframeDemo.vue
This file contains 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
<template> | |
<iframe :src="the_url" @load="onIframeLoad" /> | |
</template> | |
<script> | |
export default { | |
data () { | |
return { | |
the_url: "http://xxx.com/yyy", | |
some_id: 42 |
View sudoku.go
This file contains 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
package main | |
import ( | |
"io/ioutil" | |
"log" | |
"os" | |
"regexp" | |
"strings" | |
) |
View gist:856270
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <arpa/inet.h> |
View gist:856140
This file contains 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
# Save this file using DOS's CR/LF. | |
export VAR1=blahblahblah | |
export VAR2=hello | |
export VAR1=$VAR1:$VAR2 |
View tun-ping-win.py
This file contains 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 _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: |
View tun-ping-mac.go
This file contains 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
package main | |
import ( | |
"exec" | |
"log" | |
"os" | |
) | |
func main() { | |
file, err := os.Open("/dev/tun0", os.O_RDWR, 0) |
View tun-ping-mac.py
This file contains 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 os | |
import subprocess | |
# Open file corresponding to the TUN device. | |
tun = open('/dev/tun0', 'r+b') | |
# Bring it up and assign addresses. | |
subprocess.check_call('ifconfig tun0 192.168.7.1 192.168.7.2 up', shell=True) |
NewerOlder