This file contains 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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby | |
# - a browser with WebSocket support | |
# | |
# Usage: | |
# ruby redis_pubsub_demo.rb | |
# |
This file contains 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
/* Ejs parser for Nodejs | |
* | |
* Copyright (c) 2009, Howard Rauscher | |
* Licensed under the MIT License | |
*/ | |
// PUBLIC METHODS | |
function parse(input) { | |
var output = []; | |
var innerOutput = []; |
This file contains 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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: supervisord | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
This file contains 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
source 'http://rubygems.org' | |
# -------------------- | |
# Rails | |
# -------------------- | |
gem 'rake' | |
gem 'arel', :git => 'git://github.com/rails/arel.git'#, :branch => '1-0-stable' | |
# gem 'rails', '~> 3.0.0' | |
gem 'rails', :git => 'git://github.com/rails/rails.git', :branch => '3-0-stable' |
This file contains 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
{ | |
"log": { | |
"loglevel": "none" | |
}, | |
"inbound": { | |
"port": 23456, | |
"listen": "127.0.0.1", | |
"protocol": "socks", | |
"settings": { | |
"udp": true |
This file contains 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
<script type="text/vnd.graphviz" id="graphviz"> | |
digraph G { | |
"browser" -> | |
"http_request" -> | |
"server" -> | |
"routes" -> | |
"controller" -> | |
"model" -> "controller" | |
"controller" -> "response" | |
"response" -> "view" -> "html" |
This file contains 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
from selenium import webdriver | |
driver = webdriver.Firefox() | |
driver.get('https://www.facebook.com/') | |
with open('jquery-1.9.1.min.js', 'r') as jquery_js: | |
jquery = jquery_js.read() #read the jquery from a file | |
driver.execute_script(jquery) #active the jquery lib | |
driver.execute_script("$('#email').text('anhld')") |
This file contains 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
import time,urllib2 | |
from selenium import webdriver | |
_init_js=""" | |
(function (){ | |
if (window.__e) | |
{ return; | |
} | |
var e=document.createElement('div'); | |
e.setAttribute("id","__s_msg"); | |
e.style.display="none"; |
This file contains 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
// ==UserScript== | |
// @name New Script | |
// @namespace Violentmonkey Scripts | |
// @match *://*/* | |
// @grant none | |
// @grant GM_setValue | |
// @grant GM.getValue | |
// ==/UserScript== | |
var i = 1; | |
var num = 2; |
OlderNewer