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 json | |
import os | |
import time | |
import webbrowser | |
import sys | |
import re | |
def handleWindows(extra_seconds): | |
print("OS : Windows") |
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
set theDMG to choose file with prompt "Please select javaforosx.dmg:" of type {"dmg"} | |
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG | |
do shell script "pkgutil --expand /Volumes/Java\\ for\\ macOS\\ 2017-001/JavaForOSX.pkg ~/tmp" | |
do shell script "hdiutil unmount /Volumes/Java\\ for\\ macOS\\ 2017-001/" | |
do shell script "sed -i '' 's/return false/return true/g' ~/tmp/Distribution" | |
do shell script "pkgutil --flatten ~/tmp ~/Desktop/Java.pkg" | |
do shell script "rm -rf ~/tmp" | |
display dialog "Modified Java.pkg saved on desktop" buttons {"Ok"} |
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
var PDFDocument = require('pdfkit') | |
const fs = require('fs'); | |
var doc = new PDFDocument | |
doc.image('images/qrc_1000.png', 20, 15, {width: 100}).text('Proportional to width', 0, 0) | |
doc.image('images/qrc_1000.png', 220, 15, {width: 100}).text('Proportional to width', 0, 0) | |
doc.image('images/qrc_1000.png', 320, 15, {width: 100}).text('Proportional to width', 0, 0) |
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
require 'rubygems' | |
require "json" | |
require 'cgi' | |
require 'http' | |
APPID = '--------------' | |
SECRET = '--------------------------------' | |
def get_token | |
token_url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=#{APPID}&secret=#{SECRET}" |
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
https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt |
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 铲除一切害人虫 | |
// @description 移除我想移除,留下我想留下 | |
// @match http://weibo.com/* | |
// @match http://*.weibo.com/* | |
// @match http://t.sina.com.cn/* | |
// @version 1.0 | |
// ==/UserScript== | |
// 在这里添加你想要去掉的dom的id |
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
crypto = require('crypto') | |
md5_url = (url) -> crypto.createHash('md5').update(url).digest("hex")[0..6] | |
h = {} | |
a = [] | |
for r in [1..100000] | |
z = md5_url(Math.random() + '') | |
if !h[z] | |
a.push z | |
h[z] = 1 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>COLORFUL</title> | |
<script src="/jquery-1.js" type="text/javascript" charset="utf-8"></script> | |
<script src="/modernizr.js" type="text/javascript" charset="utf-8"></script> | |
<script src="/mustache.js" type="text/javascript" charset="utf-8"></script> | |
<script> |
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
url\(\"(.*?)/(\w+.png)\"\) #=> url("../images/$2") |
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
# This is probably because you have a too recent version of bundler installed. Integrity v22 is not compatible with bundler > 0.9, but relies on functionality that was in removed in the subsequent version. In my case I installed bundler 0.9 before I ran bundle install: | |
gem install bundler --version=0.9 |
NewerOlder