Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env python3
'''pyCookieCheat.py
2015022 Now its own GitHub repo, and in PyPi.
- For most recent version: https://github.com/n8henrie/pycookiecheat
- This gist unlikely to be maintained further for that reason.
20150221 v2.0.1: Now should find cookies for base domain and all subs.
20140518 v2.0: Now works with Chrome's new encrypted cookies.
See relevant post at http://n8h.me/HufI1w
@joest67
joest67 / osx-for-hackers.sh
Created August 6, 2017 15:12 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 8 columns, instead of 7. in line 2.
430972,5037,6,52,2600.0,0,用,c
352986,4498,5,12,600.0,0,对,-
1399015,26982,569,12,600.0,0,-
678560,2954497,11,9,450.0,1,用,扫
331,18779,2,9,450.0,0,用,地址,-,win
135200,3568182,2,6,300.0,1,端口,路由,转发
992422,21469,36,6,300.0,0,脚本,存,window,调用
142786,26725,3,6,300.0,0,网,地址,-
281,18243,2,5,250.0,0,屏蔽,端口,路由,路由器
701894,22114,12,4,200.0,0,用
test:
@export env=test; \
echo $$env
@joest67
joest67 / auto_update_repo.sh
Created July 13, 2015 15:58
Auto update git repo in directory
#!/bin/sh
# source: https://github.com/florianl/AutoUpdateGit/blob/master/AutoUpdateGit.sh
# Change here your basedirectory
# Example:
# Base="/this/is/my/basedirectory"
Base=""
if [ -z "$Base" -o "$Base" == "/this/is/my/basedirectory" ];
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@joest67
joest67 / deploy_hipchat_notify.sh
Created December 11, 2014 08:46
Notify us by hipchat when someone deploy
#!/bin/sh
# Source config file
# should contains follows variables:
# AUTH_TOKEN
# ROOM_ID
source config.sh
my_func() {
return 1
@joest67
joest67 / pr_hipchat_notify.sh
Created December 11, 2014 03:06
Nofify us when we receive a pull-request by hipchat
#!/bin/sh
# Source config file
# should contains follows variables:
# AUTH_TOKEN
# ROOM_ID
source config.sh
my_func() {
return 1
@joest67
joest67 / last_zero.py
Created September 17, 2014 03:18
get zero count of factorials n.
def last_zero_num(n):
count = 0
while n:
count += n / 5
n = n / 5
return count
# -*- coding: utf-8 -*-
__author__ = 'mactalk'
import urllib, urllib2, HTMLParser
#文章列表
article_list = []
#Instapaper 的用户名和密码
username = "username@gmail.com"