Skip to content

Instantly share code, notes, and snippets.

View snow's full-sized avatar

Snow Helsing snow

View GitHub Profile
@snow
snow / sentry-alert.py
Created October 17, 2022 05:51 — forked from nikolaik/sentry-alert.py
Sentry: Automate setup of alerting rules for a project
import argparse
import json
import os
import requests
ORG_SLUG = "..."
SLACK_WORKSPACE_ID = "..."
OWNER_TEAM = "..."
SLACK_RULES = {
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Luigi Montanez's Ruby Feeds</title>
</head>
<body>
<outline title="ruby" text="ruby">
<outline text="Aaron Patterson" title="Aaron Patterson"
type="rss" xmlUrl="http://tenderlovemaking.com/feed/" htmlUrl="http://tenderlovemaking.com"/>
<outline text="Aaron Quint" title="Aaron Quint" type="rss"
@snow
snow / pygments.scss
Created September 15, 2015 14:17
theme of rouge.jneen.net extracted to https://github.com/rolandleth/rolandleth.com
.highlight { color: #666 }
.highlight .hll { background-color: #EFEFEF }
.highlight .c { color: #929292 }
.highlight .err { background: #C82829; color: #FFF }
.highlight .k { color: #C82829 }
.highlight .l { color: #F5871F }
.highlight .n { color: #666 }
.highlight .o { color: #545454 }
.highlight .p { color: #666 }
.highlight .cm { color: #929292 }
@snow
snow / deploy.rb
Last active August 29, 2015 14:24 — forked from twetzel/deploy.rb
# Clear existing task so we can replace it rather than "add" to it.
Rake::Task["deploy:compile_assets"].clear
namespace :deploy do
desc 'Compile assets'
task :compile_assets => [:set_rails_env] do
# invoke 'deploy:assets:precompile'
invoke 'deploy:assets:precompile_local'
invoke 'deploy:assets:backup_manifest'
8.8.8.8
8.8.4.4
1114.114.114.114
202.181.224.2
216.146.36.36
@snow
snow / gist:6533497
Last active December 22, 2015 21:29
print constants in android Build
H.l(Build.BOARD, "BOARD");
H.l(Build.BOOTLOADER, "BOOTLOADER");
H.l(Build.BRAND, "BRAND");
H.l(Build.CPU_ABI, "CPU_ABI");
H.l(Build.CPU_ABI2, "CPU_ABI2");
H.l(Build.DEVICE, "DEVICE");
H.l(Build.DISPLAY, "DISPLAY");
H.l(Build.FINGERPRINT, "FINGERPRINT");
H.l(Build.HARDWARE, "HARDWARE");
H.l(Build.HOST, "HOST");
@snow
snow / gist:6434337
Last active December 22, 2015 06:58
以小组管理员身份批量删除指定用户的帖子的注入脚本,用于粘贴进console执行
(function($){
var CK = $('a[href^=http://www.douban.com/accounts/logout]').attr('href').match(/ck=\w+/)[0].substr(3),
USER = 'SOME_FUCKER'; // http://www.douban.com/people/SOME_FUCKER/
$('#group-topics tr:has(td a[href=http://www.douban.com/people/'+user+'/])').each(function(idx, el){
var jTr = $(el),
topicId = jTr.find('[href^=http://www.douban.com/group/topic/]').attr('href').match(/\d+/)[0];
$.post("http://www.douban.com/group/topic/"+topicId+"/admin_remove?ck="+CK, {
reason: 4
@snow
snow / gist:3697111
Created September 11, 2012 09:12
google cache
http://webcache.googleusercontent.com/search?q=cache:<your url without "http://">
@snow
snow / .gitconfig
Created August 25, 2012 16:50
git alias
[alias]
co = checkout
s = status -s
c = commit
p = push -u
a = add
d = diff
l = log --color --pretty=format:'%C(yellow)%h%Creset -%Cred%d%Creset %s %C(bold blue)(%cn %cr)%Creset' --no-merges --stat
[core]
editor = vim
@snow
snow / gist:1396102
Created November 26, 2011 18:32
html5 file skeleton
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="zh_cn" />
<title></title>
<link rel="stylesheet" type="text/css" href="c/common.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="s/jquery.min.js"></script>