Skip to content

Instantly share code, notes, and snippets.

@KartikTalwar
KartikTalwar / JavaScriptRepeat.js
Created April 5, 2012 00:12
Make a JavaScript function repeat every x seconds
function refreshData()
{
x = 5; // 5 Seconds
// Do your thing here
setTimeout(refreshData, x*1000);
}
@ninehills
ninehills / wr703n-openwrt.md
Last active December 9, 2022 13:37
WR703N OpenWrt 配置流程

WR703N OpenWrt 配置流程

下载安装

访问WR703N在OpenWrt的[Wiki页][wr703n-openwrt],然后在Flashing一节中找到下载链接:[squashfs-factory.bin][flash.bin],下载后别忘了[比对md5][md5sum]。[1]

进入路由器管理界面,出厂配置为http://192.168.1.1,用户名和密码均为admin,然后进入固件更新,选择下载的文件,然后更新。

@isayme
isayme / v2ex_coin.py
Last active July 3, 2020 07:59
V2EX 每日登陆奖励自动获取脚本. 此脚本不再更新, 毕竟要依赖第三方pycurl库. 新版见: https://github.com/isayme/v2ex
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 此脚本不再更新, 毕竟要依赖第三方pycurl库.
# 重写的脚本不再依赖非标准库, 感兴趣的见: https://github.com/isayme/v2ex
import sys
import string
try:
import pycurl2 as pycurl
@fdb713
fdb713 / xiami.py
Created November 20, 2013 07:50
xiami.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
File: xiami.py
Author: Luigi Fan
Description: Auto check-in script for xiami.
'''
import requests
import re
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active June 6, 2024 08:23
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@roamlog
roamlog / iTunesIconForChina.rb
Last active August 29, 2015 13:56 — forked from ttscoff/itunesicon.rb
用于从 Appstore 中国店下载 app 图标的脚本
#!/usr/bin/ruby
# encoding: utf-8
#
# Grab iTunes Icon - Brett Terpstra 2014 <http://brettterpstra.com>
#
# Retrieve an iOS app icon at the highest available resolution
# All arguments are combined to create an iTunes search
# The icon for the first result, if found, is written to a filename based on search terms
#
# example:
@zxhfighter
zxhfighter / fiddler-custom-rules.md
Created July 17, 2014 04:06
use fiddler to save files automatically

使用Fiddler自动保存文件

背景

先来看个生活中的实际需求:在网上看到美图,想保存下来,你是怎么做的呢?

这还不简单?选中图片-图片另存为-选择文件夹保存不就行了么!

其实大部分人都是这么做的,那有没有更好的办法呢?

@anhldbk
anhldbk / Selenium.Python.InjectJS.py
Last active April 15, 2023 03:53
Inject jQuery into Selenium Driver
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('https://www.facebook.com/')
with open('jquery-1.9.1.min.js', 'r') as jquery_js:
jquery = jquery_js.read() #read the jquery from a file
driver.execute_script(jquery) #active the jquery lib
driver.execute_script("$('#email').text('anhld')")
@hasegawayosuke
hasegawayosuke / CustomeRule.js
Last active August 17, 2020 05:58
Hide CSS files of Fiddler tracif
// Open Fiddler and Choose "Rules" menu, click "Customize Rules..." and add this code to CustomRule.js
class Handlers
{
// ....
public static RulesOption("Hide CSS")
BindPref("fiddlerscript.rules.HideCSS")
var m_HideCSS: boolean = false;
// ....
static function OnBeforeResponse(oSession: Session) {
# -*- coding: utf-8 -*-
#
# Author: oldj
# Email: oldj.wu@gmail.com
# Blog: http://oldj.net
#
import os
import re
import StringIO