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/bash | |
set -e | |
############################################### | |
### Add this to your ~/.ssh/config # | |
### ControlPath ~/.ssh/master-%r@%h:%p # | |
### ControlMaster no # | |
### Run this as ./persistent_ssh.sh box1 box2 # | |
############################################### | |
MY_PROMPT="$ " |
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
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
require 'pry' | |
class Proxy | |
def server(port) | |
puts "Starting Proxy server on port #{port}" | |
@socket = TCPServer.new('localhost', port) | |
loop do |
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
@echo off | |
:loop | |
REM Check if the process is already running | |
tasklist /fi "imagename eq %1" | find /i "%1" > nil | |
if errorlevel 1 ( | |
REM If not start the process | |
goto :main | |
) else ( | |
REM Else keep checking every 5 seconds whether it is alive |
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
if $CmdLine[0] >= 1 Then | |
$userInput = $CmdLine[1] | |
Else | |
$userInput = InputBox("GetURL", "Enter the bame of the browser", "firefox", "", "") | |
EndIf | |
if $userInput == "firefox" Then | |
$window = "[CLASS:MozillaWindowClass]" | |
if not winexists($window)=1 then; | |
MsgBox(0, "GetURL", "Mozilla Firefox is not running") |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] | |
"AutoAdminLogon"="1" | |
"DefaultUserName"="test" | |
"DefaultPassword"="123456" |
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
set username to do shell script "whoami" | |
set uid to do shell script "id | cut -d' ' -f1 | cut -d'=' -f2 | cut -d'(' -f1" | |
do shell script "/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser " & username with administrator privileges | |
do shell script "/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow autoLoginUserUID " & uid with administrator privileges | |
display dialog "User " & username & " is now the default Auto Login." |
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
[100 +] prashanthrajagopal ~/StandardMenus.nib | |
=> diff objects.xib /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/StandardMenus.nib/objects.xib | |
185a186,212 | |
> <object class="IBCarbonMenuItem" id="236"> | |
> <string name="title">Sleep</string> | |
> <ostype name="command">slep</ostype> | |
> </object> | |
> <object class="IBCarbonMenuItem" id="237"> | |
> <string name="title">Restart…</string> | |
> <boolean name="dynamic">TRUE</boolean> |
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
require "selenium/client" | |
selenium = Selenium::Client::Driver.new("localhost", 4444, "*firefox", "http://www.google.com/", 60); | |
selenium.start | |
selenium.open "/" | |
selenium.type "q", "bowsersttack" | |
selenium.click "btnG" | |
selenium.wait_for_page_to_load "30000" | |
puts selenium.get_html_source |
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
# Adapted from https://gist.github.com/4651531.git with a few mods according to my needs | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8888"; | |
.connect_timeout = 60s; | |
.first_byte_timeout = 60s; | |
.between_bytes_timeout = 60s; | |
.max_connections = 800; | |
} |
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
# Should we start varnishd at boot? Set to "no" to disable. | |
START=yes | |
# Maximum number of open files (for ulimit -n) | |
NFILES=131072 | |
# Maximum locked memory size (for ulimit -l) | |
# Used for locking the shared memory log in memory. If you increase log size, | |
# you need to increase this number as well | |
MEMLOCK=82000 |
OlderNewer