Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
ryanflorence / static_server.js
Last active July 21, 2024 12:43
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
@intellecat
intellecat / decode_douban_read_test
Created February 29, 2012 07:35
解密豆瓣阅读数据试验
//t是"加密"的内容,在gist里面看不到 其实就是"var t = {"data":"M6XaU5P4..."
var t = {"data":"M6XaU5P4g6Arj50sU5XkCVK1l9GeU5AsisAlu0kqTTgew2A0AFGkltoHASeswNOpT_VLB8l2CsNl\nAsasU5XkCVK4d9G0C2ArAsA0AFG63j8WUtJ4U5AsisAsnIX0CjOsisXPAsasg5TsltH4UtNsisAs\nnIXSU$84Cj84g6Arj50slwHaC2ArAFm1gRJFgRJadIA0ARG1ltQsiF0sltTOlIArA1V0ejgXuDky\nfVAabao9EwzBleGNL3bzbaoqtHUyuSkuzNrEuskgB$9$ycoHiTq3EcAlAsasCRK6UjJ4ASkxAFmL\n3RK0CIArCRJ0g$N0AFmLdj8vCj84ASkR3joWC2asgJKoljK4C2ArCRJ0g$N0AFmL3$TZltT6ASkR\n3joWC2aslJKkURGHUFzsiRC1UwPHL9VKnw0slwHaC2ArAFm1gRJFgRJadIA0ARG1ltQsiF0sltTO\nlIArA1VLN$ahC1K4c8lsuSGDa9mpbaoiVvx03ehq$NOhj$HUNASJNjTCYFkrySwbBXcm9OmU1VZC\nEcAlAsasCRK6UjJ4ASkxAFmL3RK0CIArCRJ0g$N0AFmLdj8vCj84ASkR3joWC2asgJKoljK4C2Ar\nCRJ0g$N0AFmL3$TZltT6ASkR3joWC2aslJKkURGHUFzsiRC1UwPHL9VKnw0slwHaC2ArAFm1gRJF\ngRJadIA0ARG1ltQsiF0sltTOlIArA1$q$Taq9cK$1JvhMFhIETgejOlURNOpUaXpzLfEMF7PsvOc\nusku6QOcuskRw5Wxbao9YJZwj8HinCS3Nh1i1vOw9FG$1JJXUNt3WRd4TAo6d34eukJssebCuskU\ndTpz3r1NQNxjleG$xFdQTWBbtHvhHSPf76cNAmG9EwzBAmzyJJE9LO8pEscNAmGbSHUKAmzyJJyh\n1I1HDV5MAmzyJ
@suziewong
suziewong / git.md
Last active September 30, 2024 08:18
Git的多账号如何处理? 1.同一台电脑多个git(不同网站的)账号 2.同一台电脑多个git(同一个网站的比如github的)多个账号

1.同一台电脑可以有2个git账号(不同网站的)

首先不同网站,当然可以使用同一个邮箱,比如我的github,gitlab,bitbucket的账号都是monkeysuzie[at]gmail.com 这时候不用担心密钥的问题,因为这些网站push pull 认证的唯一性的是邮箱 比如我的windows 上 2个账号一个gitlab 一个github (用的都是id_rsa)

host github
  hostname github.com
  Port 22

host gitlab.zjut.com

@osharim
osharim / Run django and nodejs running over nginx in the same server
Last active December 21, 2023 12:58
Nginx reverse proxy with Django & Node
#Django Config
server {
server_name domain.com;
access_log on;
location / {
proxy_pass http://127.0.0.1:8001;