Skip to content

Instantly share code, notes, and snippets.

View ETiV's full-sized avatar
🛥️
船迟又遇打头风

ETiV

🛥️
船迟又遇打头风
  • Shanghai, China
  • 23:40 (UTC +08:00)
View GitHub Profile
anonymous
anonymous / JanDanCleanComments.js
Created August 1, 2013 11:45
眼不见心不烦, 删除煎蛋多说"吐槽"中某些人的评论. 更新: * 更友好的操作体验 * 将数据保存在 localStorage, 而不写死在脚本文件中 * 总之就是比第一版好- -
// ==UserScript==
// @name CleanComments
// @namespace ForBetterJanDan
// @description 眼不见心不烦, 删除煎蛋多说"吐槽"中某些人的评论
// @include http://jandan.net/pic*
// @include http://jandan.net/ooxx*
// @version 2
// ==/UserScript==
if ($ != undefined) {
anonymous
anonymous / JanDanCleanComments.js
Created August 1, 2013 06:12
眼不见心不烦, 删除煎蛋多说"吐槽"中某些人的评论
// ==UserScript==
// @name CleanComments
// @namespace ForBetterJanDan
// @description 眼不见心不烦, 删除煎蛋多说"吐槽"中某些人的评论
// @include http://jandan.net/*
// @version 1
// ==/UserScript==
document.addEventListener('DOMNodeInserted',function(){
// 屏蔽关键字列表, 内容为多说的UserID
@jedi4ever
jedi4ever / nodejs-cluster-zero-downtime.md
Last active February 11, 2024 13:45
nodejs clustering, zero downtime deployment solutions

Clustering: The basics

The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)

It does not balance, it leaves it to the kernel.

In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)

@Marlunes
Marlunes / hide_status_bar
Created July 16, 2013 07:54
FORCE HIDE STATUS BAR FOR IOS 7 AND 6
//viewDidload
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
@mytharcher
mytharcher / app.js
Created March 13, 2013 05:29
Partials path config for Hogan(Mustache) in Express.js
app.set('partials', require('./lib/partials'));
@mattt
mattt / uiappearance-selector.md
Last active June 4, 2024 13:28
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \
@binux
binux / xf_magnet.js
Last active October 19, 2023 02:38
QQ旋风网页版,磁力链支持 书签: javascript:void((function(){var d=document;var s=d.createElement('script');s.src='http://blog.binux.me/assets/image/xf_magnet.js';s.id='binux_script';d.body.appendChild(s)})())
// vim: set et sw=2 ts=2 sts=2 ff=unix fenc=utf8:
// Author: Binux<i@binux.me>
// http://binux.me
// Created on 2013-01-21 20:18:42
jQuery.ajax({
url: 'http://pyproxy.duapp.com/http://httpbin.duapp.com/cookies/set?userid=21',
cache: true,
dataType: 'script',
success: function() {
@rhybroy
rhybroy / fetchsub.sh
Created October 28, 2012 06:43 — forked from ravageralpha/fetchsub.sh
shell script get subtitle from shooter.cn
#!/bin/sh
# Author: RA <ravageralpha@gmail.com>
USAGE(){
echo "Usage:fetchsub [eng] file"
}
[ $# -eq 0 -o "$1" = '--help' ] && USAGE && exit 0
ERROR(){
@astanin
astanin / Direct_Links_in_Google_Search.user.js
Created September 25, 2012 14:52
Remove indirections from Google search results on all TLDs (GreaseMonkey script)
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark