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
Show hidden characters
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// | |
// * set all enforcing options to true |
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
##### 变量大小写的结论 | |
* 构造器 Class、Object 用 TheSomeone // 先祖的权威 | |
* 方法名称 doSomething // 动宾,够醒目 | |
* 文件名称 the_file // 网络传输可能会忽略大小写、可读性 | |
* 普通变量 some_variables // 可读性 | |
* CSS class: the-class-name | |
* CSS id: the_some_one |
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> |
NewerOlder