This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| iptables -t mangle -F | |
| iptables -t mangle -X | |
| #download | |
| tc qdisc del dev br0 root | |
| tc qdisc add dev br0 root handle 1: htb default 20 | |
| # download | |
| # level 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bundler/capistrano' | |
| set :application, "wizzey" | |
| default_run_options[:pty] = true # Must be set for the password prompt from git to work | |
| set :repository, "[email protected]:mehdi/Wizzey.git" # Your clone URL | |
| set :branch, "master" | |
| set :scm, "git" | |
| set :user, "app" # The server's user for deploys | |
| set :deploy_to, "/opt/webapps/#{application}" | |
| set :deploy_via, :remote_cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| location ~ /data { | |
| internal; | |
| root /rails/app/path; | |
| } | |
| location / { | |
| #...... | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-Real-IP $remote_addr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| phantom = require("phantom") | |
| express = require("express") | |
| app = express() | |
| app.get "*", (req, res) -> | |
| phantom.create (ph) -> | |
| ph.createPage (page) -> | |
| page.open "http://localhost:9000/#{req.route.params[0]}", (status) -> | |
| page.evaluate (-> document.getElementsByTagName('html')[0].outerHTML), (result) -> | |
| res.end result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>user.shadowsocks</string> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| <key>KeepAlive</key> | |
| <true/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>user.shadowsocks</string> | |
| <key>RunAtLoad</key> | |
| <true/> | |
| <key>KeepAlive</key> | |
| <true/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Visahq.EntriesController = Ember.ArrayController.extend | |
| needs: ['mattersNew'] | |
| content: Ember.computed.alias('controllers.mattersNew.entries') | |
| itemController: 'entry' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule WebSocket.Mixfile do | |
| use Mix.Project | |
| def project do | |
| [app: :bigdata_ws, | |
| version: "0.0.1", | |
| elixir: "~> 0.13.1", | |
| deps: deps] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def run | |
| EventMachine::run { | |
| Signal.trap("INT") { EventMachine.stop } | |
| Signal.trap("TERM") { EventMachine.stop } | |
| client = Faye::Client.new('http://tangpin.dev:6901/pulling') | |
| store = Store.new | |
| ws = WebSocket.new(client, store) | |
| ws.subscribe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyTestError < StandardError; end | |
| class MyTest | |
| attr_accessor :test | |
| def initialize | |
| @test = {} | |
| end | |
| def self.test(description, &block) |
OlderNewer