Skip to content

Instantly share code, notes, and snippets.

@laomo
laomo / sms.html
Last active March 4, 2024 06:23
打开网页自动向指定号码发送短信
<!-- https://example.com/sms.html?phone=12306&content=999 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>发送短信</title>
</head>
<body>
<script>
@laomo
laomo / InspectAPK.sh
Created May 5, 2016 06:25 — forked from j796160836/InspectAPK.sh
Inspect APK's info like package name, version code, version name, etcetera
#!/bin/bash
apk_file=$1
if [ -z $apk_file ]; then
apk_file_num=`ls *.apk | wc -l | tr -d ' '`
if [ $apk_file_num -gt 1 ]; then
echo "Ambiguous apk_files. Please enter one APK to inspect."
exit -1
fi
apk_file=`ls *.apk`
@laomo
laomo / fetion.py
Created May 21, 2014 09:18
一个利用飞信给自己发消息的脚本
#-*-coding: utf-8 -*-
#!/usr/bin/python
import requests
def sendMsg(msg):
url_space_login = 'http://f.10086.cn/huc/user/space/login.do?m=submit&fr=space'
url_login = 'http://f.10086.cn/im/login/cklogin.action'
url_sendmsg = 'http://f.10086.cn/im/user/sendMsgToMyselfs.action'
parameter= { 'mobilenum':'yourmobile', 'password':'yourpassword'}
@laomo
laomo / jquery.min.js
Last active June 8, 2016 12:42
生成当前页面url的二维码,供手机扫描访问或分享
/*! jQuery v2.1.1-rc2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1-rc2",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a
@laomo
laomo / boinc_for_wcg.sh
Last active December 31, 2015 11:59
为WCG做贡献(攒Ripple的XRP)自动化脚本
#/bin/bash
# Author : laomo
# Donate Address : https://ripple.com//send?to=rQKFznLaiyT55YXSS33fE6NgTjKbrnN4gT
sudo apt-get update
sudo apt-get install libxss1 libstdc++5 ia32-libs freeglut3
#optional(for see the tasks)
sudo apt-get install htop
wget http://boinc.berkeley.edu/dl/boinc_7.2.33_x86_64-pc-linux-gnu.sh
data:text/html,<body contenteditable style=font-family:monospace>
@laomo
laomo / V2EXSearch.user.js
Last active December 29, 2015 12:49
V2EX搜索 当前的搜索基于v2ex.com,所以由于子域名比较多,搜索记录会有很多重复。修改搜索基于当前访问的子域名,保证不重复。
// ==UserScript==
// @name V2EX搜索
// @namespace http://lmbj.net
// @description 当前的搜索基于v2ex.com,所以由于子域名比较多,搜索记录会有很多重复。修改搜索基于当前访问的子域名,保证不重复。
// @include http://www.v2ex.com/*
// @version 0.2
// ==/UserScript==
dispatch = function() {
var q = document.getElementById("q");
if (q.value != "") {
@laomo
laomo / shorten.js
Created November 27, 2013 07:43
新浪短链接生成js版
var url_shorten = "http://api.weibo.com/2/short_url/shorten.json";
function ltrim(str){ //删除左边的空格
return str.replace(/(^\s*)/g,"");
}
function rtrim(str){ //删除右边的空格
return str.replace(/(\s*$)/g,"");
}
function trim(str){ //删除左右两端的空格
@laomo
laomo / v2ex-reply-helper.user.js
Created September 25, 2013 02:15
V2EX回复@助手 输入@即可自动提示可以回复的ID,方向键可以选择,回车即完成输入
// ==UserScript==
// @name V2EX回复@助手
// @namespace http://lmbj.net
// @description V2EX回复@助手 输入@即可自动提示可以回复的ID,方向键可以选择,回车即完成输入
// @include http://www.v2ex.com/t/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require http://jquery-sew.s3-website-us-east-1.amazonaws.com/jquery.sew.js
// @require http://jquery-sew.s3-website-us-east-1.amazonaws.com/jquery.caretposition.js
// @updateURL https://userscripts.org/scripts/source/178530.meta.js
// @downloadURL https://userscripts.org/scripts/source/178530.user.js
@laomo
laomo / baidu-suixin-huantai.user.js
Last active December 22, 2015 15:49
百度随心听的换台太恶心了,能换的台都是一个大类,当我想听Ta的电台时,比如“董贞”~~!必须去百度音乐里搜索,然后点击“收听Ta的电台”,这个脚本就是要解决这个问题,可以在 http://fm.baidu.com/ 页面直接换台,输入想听的电台,回车或点击随心换台即可
// ==UserScript==
// @name 百度随心换台
// @namespace http://lmbj.net
// @description 百度随心听的换台太恶心了,能换的台都是一个大类,当我想听Ta的电台时,比如“董贞”~~!必须去百度音乐里搜索,然后点击“收听Ta的电台”,这个脚本就是要解决这个问题,可以在http://fm.baidu.com/页面直接换台,输入想听的电台回车或点击随心换台即可
// @include http://fm.baidu.com/
// @grant GM_xmlhttpRequest
// @updateURL https://userscripts.org/scripts/source/177480.meta.js
// @downloadURL https://userscripts.org/scripts/source/177480.user.js
// @version 0.3
// ==/UserScript==