Skip to content

Instantly share code, notes, and snippets.

View xream's full-sized avatar

xream xream

View GitHub Profile
@xream
xream / readme.md
Created October 12, 2023 16:35 — forked from firexcy/readme.md
DIY a Rewind.ai

This Gist provides a solution to periodically capture screenshots of your Mac, and create therefrom a searchable PDF archive so that you can always get an answer to the “what, when, and where” questions about your usages.

To use these scripts:

  1. Download the shell script rewind, then:
    1. put it under ~/bin (or other fixed path you prefer);
    2. execute
@xream
xream / sojson.v5.decrypt.js
Created September 12, 2023 06:29 — forked from zhangshine/sojson.v5.decrypt.js
sojson.v5 解密
// 用法 console.log(decrypt(加密的js内容))
// console里面输出的内容就是解密后的内容,解密后的内容里面仍然含有 _0xXXXX 这样的混淆后的字符串, 需要一点点进行重命名
// 下面的代码以前从网上找的,已经找不到出处了。。。
function decrypt(js_body) {
// 脱壳 && 解密
let js_arr = js_body.split("\n").pop().split(';'),
fun_name = /var\s+(_0x[a-z0-9]+)=/.exec(js_arr[6])[1],
reg_str = fun_name + '\\(' + "'([^']+)',\s*'([^']+)'" + '\\)',
js_str = js_arr.slice(54, js_arr.length - 4).join(' ;'),
@xream
xream / Keystone 5 - Secure Cookies and Reverse Proxies.md
Created May 6, 2020 02:46 — forked from molomby/Keystone 5 - Secure Cookies and Reverse Proxies.md
Background and instructions for fixing cookie issues encountered when deploying Keystone 5 apps behind a reverse proxy (like nginx)

Keystone 5: Secure Cookies and Reverse Proxies

Can't sign in, eh?

TL;DR

When...

  • Keystone sessions are being used (eg. for authentication)
  • secureCookies Keystone config is true (the default when NODE_ENV is 'production')
@xream
xream / gist:5f4cda0f482c493a8293d5078d0dab7d
Created November 23, 2017 01:08 — forked from Blankwonder/gist:cd9fa1987e41cf1a1f1df50583ba1d9c
client-side SSL/TLS certificate validation
[Proxy]
TestTLS = https, 192.168.20.6, 443, client-cert=item
[Keystore]
item = password=123456, base64=MIILqQIBAzCCC28GCSqGSIb3DQEHAaCCC2AEggtcMIILWDCCBg8GCSqGSIb3DQEHBqCCBgAwggX8AgEAMIIF9QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIh4LPGCPkcqkCAggAgIIFyDOP/a/YB66H0jctVC5/D3ZF98es9Xtf60hqDokaekMp7VlKhr7EEvf1GrmxOY9XqO1dSR0F2C17yefazR7lZVDwfmNvU8eEpIPrBAnqSnCFyMZGXjcu9aoEySkwRlSclqg9lbFhp9XZG4F4qRuo94mlTPDy47dvdzyiPAQPBIq2DOE/qbRVHqrbnZMkUZi1lxihRRcQv7YJAfLEP2VHffjZTYzlBMi/ldKyD4ZQdpM7mdBtHXFa21ZV9j4oqM2PWWToHwIxkeiS6J2SgfEg501QEy4kbihlp+pSK4OMrj33DrVFP9rOMDnkJtQ+EP0LXXQBaF+7rRp+dekcH+sYBQF0cDMhNEkHEBL8LoQ96hZxIDxE3YQ6fq9KGi4TV8Ktkgb2l0G5DoavN8dhCKS5Gx0nexDT8vj91Js94Xt4tFThSyoc4ZmZvN+b2ugqVvYsnWaKqS8UeAjIAFsZCiLgj4OG6frrAxI+V3c8kL9FrwfFQcL9eWoqVfhBv8SKzMYObTv9FwyJn/fyGdtoT19OpyWiP1+nU+WY7e5KjcJNsKeYolgpgHDXdOSYCakQfesENeeKqvzMA6Quj7g7gZl/AB/GjRybyAXfkxyYBLk5cz7MuDcM1nk6DR47IuHBHyrwOATXyejWYrlK0QUVUsFEmM2vjl38jU8+qxjVWDTFu3gQkFBERncJp1XnKSTueDEPkdeq1BzV1SZ1m1KHNPNI4h2lPa+IKvpYbnDure9n1VV7fk2ySJrBFT5pYonXdpyaCTAvTEFk
@xream
xream / gist:6279636
Created August 20, 2013 10:05 — forked from ym/gist:6279456
server
{
listen 443;
server_name twitter-api.vii.im api.twitter.com;
ssl on;
ssl_certificate /etc/nginx/certs/vii.im.crt;
ssl_certificate_key /etc/nginx/certs/vii.im.key;
location / {

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@xream
xream / twitter-faster.user.js
Created August 31, 2012 03:14
Twitter Faster
// ==UserScript==
// @name Twitter Faster
// @namespace Twitter-Faster
// @description Make twitter web faster by auto collect old tweets and shorten auto update interval.
// @include http://twitter.com/*
// @include https://twitter.com/*
// @match http://twitter.com/*
// @match https://twitter.com/*
// @run-at document-end
// @version 1.1
@xream
xream / proxy.pac
Created August 31, 2012 02:45 — forked from ayanamist/proxy.pac
My Pac File for Auto Proxy
var PROXY = {
"direct":"DIRECT",
"goagent":"PROXY 127.0.0.1:8087",
"vps":"PROXY 127.0.0.1:8123",
"edu":"PROXY 127.0.0.1:4080",
"sogou":"PROXY 127.0.0.1:8083",
"tele":"PROXY 127.0.0.1:4480"
};
var ALL = [
@xream
xream / flora_pac.py
Created April 24, 2012 03:58
flora_pac.py
#!/usr/bin/env python
#
# Refined by @phuslu
# Flora_Pac by @leaskh
# www.leaskh.com, i@leaskh.com
#
# based on chnroutes project (by Numb.Majority@gmail.com)
#
import re