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 / 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 / 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" "$@"
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
<?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/>
<!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";
@Leask
Leask / profile1.bak
Last active October 16, 2016 19:13
Asphalt 6 Cleared
@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 / 03-06_01.png
Last active December 1, 2016 04:19
Proxy speed ranking.
03-06_01.png
@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 / endless.js
Created June 13, 2017 04:16
Endless Scroll
var fakeAjax = function(url, success, fail) {
setTimeout(function() {
console.log('Done!!!');
success();
}, 1000);
};
var render = function() {
$('.cloud-Label ul.clearFix').append('<li>anything</li>');
};