Skip to content

Instantly share code, notes, and snippets.

View pityonline's full-sized avatar

pityonline pityonline

View GitHub Profile
@pityonline
pityonline / sz_xqc_nums.sh
Created April 4, 2020 10:23
深圳小汽车号段
#!/usr/bin/env bash
# the cookie string can be generated by accessing https://gd.122.gov.cn/views/vehxhhdpub.html
# then copy the request as cURL from Chrome
url='https://gd.122.gov.cn/m/mvehxh/getTfhdList'
cookie=''
payload='glbm=440300000400&hpzl=02&type=0&startTime=2020-02-04&endTime=2020-04-04'
save_to='sz_xqc_nums.txt'
for i in $(seq 12);
@pityonline
pityonline / dnspod_transfer.sh
Created April 11, 2018 14:56
批量过户 DNSPod 管理的域名
#!/bin/bash
# 该脚本用来批量过户 DNSPod 管理的域名到指定的账号下
# 参见 DNSPod API 文档: https://www.dnspod.cn/docs/index.html
# 要过户给哪个账号,需要填写账号的邮箱
email="master@example.com"
# 请求的时候必须设置 UserAgent,如果不设置或者设置为不合法的(比如设置为浏览器的)也会导致帐号被封禁 API
# UserAgent 的格式必须为:程序英文名称/版本(联系邮箱),比如:MJJ DDNS Client/1.0.0 (shallwedance@126.com)
@pityonline
pityonline / installMobileProvisionFile.sh
Created February 1, 2018 09:35 — forked from benvium/installMobileProvisionFile.sh
This script installs a .mobileprovision file via bash (no GUI session needed)
#!/bin/sh
# 2012 - Ben Clayton (benvium). Calvium Ltd
# Found at https://gist.github.com/2568707
#
# This script installs a .mobileprovision file without using Xcode. Unlike Xcode, it'll
# work over SSH.
#
# Requires Mac OS X (I'm using 10.7 and Xcode 4.3.2)
#
@pityonline
pityonline / whoisat.sh
Last active August 29, 2015 14:22
find who's current in some path
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage: sudo whoisat /path"
else
path=$1
for proc in $(ps aux | awk '/pts/ {print $2}')
do
ls -l --time-style=+'%F %T' /proc/$proc/cwd 2>/dev/null
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Smart::Comments;
use feature 'say';
use XML::Simple;
@pityonline
pityonline / private.xml
Created November 1, 2012 01:26 — forked from othercat/private.xml
scroll up and down in Preview using J and K
<?xml version="1.0"?>
<root>
<item>
<name>Enable at only Preview</name>
<item>
<name>Change J to Down</name>
<identifier>remap.app_preview_j2Down</identifier>
<only>PREVIEW</only>
<autogen>--KeyToKey-- KeyCode::J, KeyCode::CURSOR_DOWN</autogen>
</item>