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 |
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
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
s_id=`curl -X POST http://127.0.0.1:4444/wd/hub/session -d '{"desiredCapabilities":{"browserName":"firefox","platform":"MAC"}}'|awk -F'"' '{print $6}'` | |
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/url -d '{"url":"http://www.google.com"}' | |
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element -d '{"using":"id","value":"gbqfq"}' | |
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element/0/value -d {"value":["selenium"]} | |
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element -d '{"using":"id","value":"gbqfb"}' | |
curl -X POST http://127.0.0.1:4444/wd/hub/session/$s_id/element/1/click | |
curl -X DELETE http://127.0.0.1:4444/wd/hub/session/$s_id/window |
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
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
display dialog "Name of the browser?" default answer "Safari" | |
set inp to text returned of result | |
tell application "System Events" | |
if inp is "Google Chrome" then | |
tell application "Google Chrome" to return URL of active tab of front window | |
else if inp is "Safari" then | |
tell application "Safari" to return URL of front document | |
else if inp is "Firefox" then | |
tell application "Firefox" to activate |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies] | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop] | |
"NoChangingWallPaper"=dword:00000001 | |
"NoAddingComponents"=dword:00000001 | |
"NoClosingComponents"=dword:00000001 | |
"NoDeletingComponents"=dword:00000001 | |
"NoEditingComponents"=dword:00000001 |
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
#include <stdio.h> | |
#include <windows.h> | |
#include <gdiplus.h> | |
#include <time.h> | |
int GetEncoderClsid(const WCHAR* format, CLSID* pClsid) { | |
using namespace Gdiplus; | |
UINT num = 0; | |
UINT size = 0; |