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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'mechanize' | |
class Visitor | |
def initialize(proxy_file, url, iterations) | |
@proxy_file = proxy_file | |
@url = url | |
@iterations = iterations | |
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
These instructions are an amalgamation of those posted at http://jdevel.wordpress.com/2011/03/26/running-opengrok-on-windows/ and my own experience. | |
To setup OpenGrok on Windows running under Tomcat: | |
1. Download OpenGrok binary. Just go to OpenGrok Home and download the latest (0.10, currently) binary | |
2. Download ctags. Just go to ctags, download windows zip file and extract it somewhere. | |
3. Edit web.xml. You need to extract lib/source.war somewhere and modify WEB-INF/web.xml slightly. I’ve modified the CONFIGURATION param to point to my generated configuration.xml file(more about it later) and added SRC_ROOT and DATA_ROOT to point to folder with sources to index and folder that OpenGrok should keep it’s data in (I’m not sure if these two are needed if you pass in configuration.xml) | |
<context-param> | |
<param-name>CONFIGURATION</param-name> | |
<param-value>D:/GrokTest/configuration.xml</param-value> |
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
# Assuming modem is a Motorola 2210-02-1006 running in bridge mode w/ a LAN IP of 192.168.1.254 | |
# Router is WRT54G running Tomato w/ LAN IP of 192.168.2.1 and is handling PPPoE | |
# In order to access modem's web UI via LAN: | |
# 1) Add the following script under Administration > Scripts > Init: | |
sleep 5 | |
ip addr add 192.168.1.2/24 dev vlan1 brd + | |
iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.1.0/24 -j MASQUERADE | |
# 2) Add the following script under Administration > Scripts > Firewall: | |
iptables -I POSTROUTING -t nat -o vlan1 -d 192.168.1.0/24 -j MASQUERADE |
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
# !/bin/bash | |
# Justin Garrick | |
# Put this script in a folder with get_flash_videos (http://code.google.com/p/get-flash-videos/) | |
# and your bookmarks.html file and run it | |
# This does no error checking/handling -- if a video cannot be found, it just won't be grabbed | |
# Grabs the urls from all bookmarks containing youtube in the url | |
for URL in `grep -i "<a href=.*youtube.*" bookmarks.html | cut -d '"' -f 2`; do | |
echo "Downloading ${URL}..." | |
# Download video as high quality mp4 if possible |
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
-nosplash | |
--launcher.defaultAction | |
openFile | |
-vm | |
C:/JDK7/jre/bin/server/jvm.dll #Windows | |
#/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java #OS X | |
-vmargs | |
-Xincgc | |
-Xss1m | |
-Duser.name=FirstName LastName |
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
SELECT SUBSTRING(physical_name, 1, CHARINDEX(N'master.mdf', LOWER(physical_name)) - 1) | |
FROM master.sys.master_files | |
WHERE database_id = 1 AND file_id = 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
SELECT L.request_session_id AS SPID, | |
DB_NAME(L.resource_database_id) AS DatabaseName, | |
O.Name AS LockedObjectName, | |
P.object_id AS LockedObjectId, | |
L.resource_type AS LockedResource, | |
L.request_mode AS LockType, | |
ST.text AS SqlStatementText, | |
ES.login_name AS LoginName, | |
ES.host_name AS HostName, | |
TST.is_user_transaction as IsUserTransaction, |
NewerOlder