Skip to content

Instantly share code, notes, and snippets.

@fdb713
fdb713 / keybase.md
Created February 16, 2020 05:52
keybase.md

Keybase proof

I hereby claim:

  • I am fdb713 on github.
  • I am fdb713 (https://keybase.io/fdb713) on keybase.
  • I have a public key ASDEsLSgTFgghmruoY8vS2igHxEvLhHL5jKMXyF91x8Kxgo

To claim this, I am signing this object:

@fdb713
fdb713 / pgyer_action.rb
Last active November 18, 2019 09:03
pgyer_action.rb with v2api
require 'faraday'
require 'faraday_middleware'
module Fastlane
module Actions
class PgyerAction < Action
def self.run(params)
UI.message("The pgyer plugin is working.")
api_host = "http://www.pgyer.com/apiv2/app/upload"
@fdb713
fdb713 / mid3iconv.py
Created March 10, 2015 08:56
mid3iconv
#!/usr/bin/env python
# ID3iconv is a Java based ID3 encoding convertor, here's the Python version.
# Copyright 2006 Emfox Zhou <EmfoxZhou@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
import sys
import locale
@fdb713
fdb713 / v2ex_checkin.py
Last active May 25, 2016 05:27
v2ex checkin
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
username = 'username'
password = 'password'
login_url = 'http://v2ex.com/signin' ###如V2EX设置了使用 SSL,必须改 https###
index_url = 'http://v2ex.com' ###同上###
mission_url = 'http://www.v2ex.com/mission/daily' ###同上###
@fdb713
fdb713 / facebook_autorepoke.py
Created May 5, 2014 02:08
Facebook Autorepoke
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Usage: chmod +x ./facebook_autorepoke.py; ./facebook_autorepoke.py email password
import requests
import sys
import re
from time import sleep
from pyquery import PyQuery as pq
@fdb713
fdb713 / ydcv.rb
Last active May 3, 2018 12:43
肥猫的有道声优(大雾)homebrew打包
require 'formula'
class Ydcv < Formula
homepage 'https://github.com/felixonmars/ydcv'
url 'https://github.com/felixonmars/ydcv/archive/master.zip'
version '0.0.1'
head 'https://github.com/felixonmars/ydcv'
def install
bin.install "src/ydcv.py" => "ydcv"
@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
@fdb713
fdb713 / vimrc.vim
Last active December 22, 2015 03:29
vimrc
" https://github.com/sontek/dotfiles/
" ==========================================================
" Dependencies - Libraries/Applications outside of vim
" ==========================================================
" Pep8 - http://pypi.python.org/pypi/pep8
" Pyflakes
" Ack
" nose, django-nose
" ==========================================================
@fdb713
fdb713 / twitter.mute.js
Last active December 17, 2015 03:09
mute tweets containing specific keyword.
// origin: @ayanamist
// ==UserScript==
// @name Twitter Timeline URL Expand
// @namespace Twitter-Timeline-URL-Expand
// @description Replace t.co href of A tag with real url.
// @match http://twitter.com/*
// @match https://twitter.com/*
// @version 1.1
// ==/UserScript==
(function (window) {
@fdb713
fdb713 / gist:06d1d5b5e98a70939eb6
Last active December 16, 2015 14:39
nginx if two condition
if ($request_uri ~ "\.htm")
{
set $my_cond P;
}
if ($args){
set $my_cond "${my_cond}C";
}
if ($my_cond = PC)
{
return 403;