Skip to content

Instantly share code, notes, and snippets.

View shinvdu's full-sized avatar

Tian Xie shinvdu

View GitHub Profile
@daqing
daqing / nginx-rabel.conf
Created February 12, 2012 03:18
Nginx + Rabel 默认配置文件
upstream thin {
server 127.0.0.1:3000;
}
#server {
# listen 80;
# server_name example.com;
# rewrite ^(.*)$ http://www.example.com$1 permanent;
#}
@wezoalves
wezoalves / nginx.conf
Created June 26, 2012 20:02 — forked from carlosfilho88/nginx.conf
Zend with nginx
server {
listen 80;
server_name www.zf.local zf.local;
index /index.php;
charset utf-8;
root "/home/workspace/zf/public";
access_log /var/log/nginx/zf/access.log;
error_log /var/log/nginx/zf/error.log;
@letsspeak
letsspeak / database.yml
Created October 30, 2012 17:41
Redmine on unicorn on nginx with mysql, my configuration files.
# Default setup is given for MySQL with ruby1.8. If you're running Redmine
# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
# Examples for PostgreSQL and SQLite3 can be found at the end.
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: ******
@igor-alexandrov
igor-alexandrov / settings.rb
Created December 11, 2011 18:51
Multiple configuration files in SettingsLogic
class Settings < Settingslogic
source "#{Rails.root}/config/application.yml"
if Rails.env == 'development'
namespace 'development-' + Socket.gethostname.gsub(/\W/, '-').gsub(/[-]{2,}/, '-')
else
namespace Rails.env
end
# load local settings
@PeterDing
PeterDing / pan.baidu.com.py
Last active March 31, 2018 13:31
百度云、百度网盘,递归下载自己的文件或分享的文件 -- keywords: pan.baidu.com, login, recursively, download -- # 移到仓库 https://github.com/PeterDing/iScript
#!/usr/bin/env python2
# vim: set fileencoding=utf8
import os
import sys
import requests
import urllib
import json
import re
import time
@madwork
madwork / decode_session_cookie.rb
Last active October 22, 2020 18:13 — forked from profh/decode_session_cookie.rb
Rails 4.1+ Decode Session
@profh
profh / decode_session_cookie.rb
Last active June 23, 2021 13:25
A simple script to decode Rails 4 session cookies
@Logic0
Logic0 / 分布式系统学习资料.md
Created August 25, 2016 06:41 — forked from zjhiphop/分布式系统学习资料.md
分布式系统学习资料

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

@anroots
anroots / Python script check that a list of sites return HTTP 200
Created January 6, 2012 11:32
Python script settings file: check that a list of sites return HTTP 200
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script check a list of websites
# and sends mail when the HTTP status code is not 200
#
# Used to check wheter all projects are up and running
# (not broken, say for example because a dependency library was removed)
# Author Ando Roots 2012
@apk
apk / websock.sh
Created April 18, 2012 15:51
A web socket server as a bash script.
#!/bin/bash
# WebSocket shell, start & browse to http://<Host>:6655/
# Requires bash 4.x, openssl.
# Author: rootshell@corelogics.de (which isn't me, apk)
coproc d { nc -l -p 6656 -q 0; }
nc -l -p 6655 -q 1 > /dev/null <<-ENDOFPAGE
HTTP/1.1 200 OK
<html><head><script language="javascript">
var url = location.hostname + ':' + (parseInt(location.port) + 1);