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
import pip | |
packages = ["StringIO"] | |
pip.main(["install", "--upgrade"] + packages ) |
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
/* The X21 virus sample */ | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <dirent.h> | |
#include <sys/stat.h> | |
DIR *dirp; /* directory search structure */ | |
struct dirent *dp; /* directory entry record */ | |
struct stat st; /* file status record */ |
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
/* | |
* Program to serve many client request without blocking | |
* using epoll | |
* | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <sys/epoll.h> |
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/setxkbmap -option "ctrl:swapcaps" |
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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
chromedriver= '/tmp/chromedriver' | |
os.environ["webdriver.chrome.driver"] = chromedriver | |
browser = webdriver.Chrome(chromedriver) | |
browser.get('http://www.site.com') | |
assert 'site' in browser.title |
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
Was trying to create an rpm from the installed haproxy binaries. | |
Ran into this problem. | |
Turns out we need to do a prelink -u haproxy on the binary that we're packaging. | |
The binary had come from a different machine than the place where we're building it. | |
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
get '/costs' do | |
begin | |
account_service = SoftLayer::Service.new("SoftLayer_Account") | |
costs= account_service.object_mask({"hardware" => ["id", "hostname","notes", "cost"]}).getHardware | |
rescue | |
@error = "Error fetching cost details !! " | |
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
import pyatspi | |
import time | |
time.sleep(5) | |
count=0 | |
for i in range (1, 10000) : | |
pyatspi.Registry.generateKeyboardEvent(65, None, pyatspi.KEY_PRESSRELEASE) | |
count=count+1 | |
if count < 33: | |
time.sleep(0.5107) |
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
OIFS="$IFS" | |
IFS=$'\n' | |
export i=1 | |
for fil in `ls -tr *.flv` ; do mv "${fil}" $i.flv; i=$(($i + 1 )); done |
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 | |
PUPPET_RUBY_DIR="/usr/local/puppetandruby" | |
PUPPET_MSTR_SERVER=" rov-master. .com" | |
# Let the path find puppet's ruby first | |
export PATH=${PUPPET_RUBY_DIR}/bin/:$PATH |