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
Match User gnub | |
ChrootDirectory %h | |
PasswordAuthentication yes | |
ForceCommand internal-sftp | |
PermitTTY no | |
X11Forwarding no | |
AllowTcpForwarding no | |
AllowAgentForwarding no |
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
public function echo_memory_usage() { | |
$mem_usage = memory_get_usage(true); | |
if ($mem_usage < 1024) | |
echo $mem_usage." bytes"; | |
elseif ($mem_usage < 1048576) | |
echo round($mem_usage/1024,2)." kb"; | |
else | |
echo round($mem_usage/1048576,2)." mb"; | |
echo "".PHP_EOL; | |
} |
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
To set APM level: | |
camcontrol cmd ada0 -a "EF 05 00 00 00 00 00 00 00 00 xx 00" | |
To disable it: | |
camcontrol cmd ada0 -a "EF 85 00 00 00 00 00 00 00 00 00 00 | |
To set AAM level: | |
camcontrol cmd ada0 -a "EF 42 00 00 00 00 00 00 00 00 xx 00" | |
To disable it: | |
camcontrol cmd ada0 -a "EF C2 00 00 00 00 00 00 00 00 00 00 |
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 -ue | |
# Dependencies (list might be incomplete): | |
# src/libevent-2.0.21-stable.tar.gz | |
# src/libsearpc (I used git f022c6509cff2eb604024c003eb60bcda975c0b1) | |
# src/ccnet (with Nicolas' patches, I used 3495a78466add16cfa9eddfb35a312bb9ce55264) | |
# src/seafile (with Nicolas' patches, I used 59eb918655dfa5f1328ec72be00681c6192f523d) | |
# | |
# Toolchain: | |
# vala (vala-0.18.1-1.fc18.x86_64) |
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
Criar Branch: | |
mkdir branches/2.14.0 | |
svn add branches/2.14.0 | |
svn cp trunk/projeto branches/2.14.0/projeto | |
cd branches/ | |
svn commit -m "Branch criada" | |
svn up | |
Merge do trunk para a branches com uma revisao: |
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
wget https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/25.0/linux-i686/en-US/ | |
profile = webdriver.FirefoxProfile("/compat/linux/opt/firefox/firefox-bin") | |
self.driver = webdriver.Firefox(profile) | |
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
.cshrc | |
setenv UNAME_v "FreeBSD 8.3-RELEASE #0: Sat Nov 29 11:15:09 BRST 2014 root@bsd:/usr/obj/usr/src/sys/GENERIC" | |
setenv UNAME_r 8.3-RELEASE | |
setenv PACKAGESITE "ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/Latest/" | |
pkg_add -r bmake | |
cp /usr/bin/make /usr/bin/make.old | |
rm /usr/bin/make | |
ln -sv /usr/local/bin/bmake /usr/bin/make |
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
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
or if it fails: | |
command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - |
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
$ head -1000 /etc/conf.d/xvfb* /etc/init.d/{xvfb,selenium-daemon} | |
==> /etc/conf.d/xvfb <== | |
XVFB=/usr/bin/Xvfb | |
XVFBARGS=":90 -auth /etc/conf.d/xvfb.cfg -nolisten tcp" | |
PIDFILE=/var/run/xvfb.pid | |
==> /etc/conf.d/xvfb.cfg <== | |
localhost | |
==> /etc/init.d/xvfb <== |
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 | |
from selenium.webdriver.remote.remote_connection import RemoteConnection | |
from selenium.webdriver.remote.errorhandler import ErrorHandler | |
from selenium.webdriver.remote.command import Command | |
class PersistentWebdriver (webdriver.Remote): | |
def __init__(self, session_id=None, browser_name=''): | |
command_executor='http://localhost:4444/wd/hub' |
OlderNewer