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
# | |
# Compilation of Yum Repositories for RHEL/Fedora | |
# | |
# | |
# RBEL | |
# | |
http://rbel.frameos.org/stable/el5/i386, rbel5-i386, rhel-5 | |
http://rbel.frameos.org/stable/el5/x86_64, rbel5-x86_64, rhel-5 |
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
# my quick and dirty method: | |
setsid /bin/sh -c "cd /; $@ 2>&1 < /dev/null | logger -t $1 &" | |
# or the full proper method, found online: | |
# full daemonization of external command with setsid | |
daemonize() { | |
( # 1. fork | |
# 2.1. redirect stdin/stdout/stderr before setsid. redirect tty fds to /dev/null. |
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/sh | |
# This script ensures that Xvnc is running | |
vncserver :0 -depth 8 -geometry 1280x1024 -PasswordFile /opt/ci/passwd | |
setsid mwm 2>&1 > /dev/null |
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 | |
XVFB=/usr/bin/Xvfb | |
XVFBARGS=":0 -screen 0 1280x1024x8 -fbdir /var/run" | |
PIDFILE=/var/run/xvfb.pid | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
case "$1" in |
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/sh | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
setsid java -jar /opt/ci/selenium-server-standalone-2.35.0.jar 2>&1 > /var/log/selenium.log & |
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/sh | |
# This is run by a cron job. It periodically checks our repository and triggers a new jenkins run. | |
cd /var/www/bg/current | |
output=$(git pull) | |
if [ "$output" != "Already up-to-date." ]; then | |
curl -sS http://127.0.0.1:8080/job/BG5/build?token=bg5isthecoolest | |
fi |
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
I forget this snippet too much... | |
DirectoryIndex index.html index.php | |
AcceptPathInfo On | |
SuexecUserGroup user group | |
RewriteEngine On | |
# FastCGI PHP | |
<Files *.php> | |
SetHandler fcgid-script | |
#AddHandler fcgid-script .php |
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
In the page somewhere: | |
<script type="text/javascript" defer> | |
var gcRender = function() { | |
var sitekey, gcs, i, rcks, len; | |
sitekey = ''; | |
// Render all .g-recaptcha's on the page | |
gcs = document.getElementsByClassName('g-recaptcha'); | |
len = gcs.length; | |
for (i = 0; i < len; i++) { |
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
location /health.pgrep { | |
default_type text/plain; | |
access_log off; | |
content_by_lua ' | |
local io = require "io" | |
if (ngx.var.arg_q ~= nil and ngx.var.arg_q ~= "") then | |
-- Note: Testing this over 127.0.0.1 will always succeed. | |
local arg_q = ngx.var.arg_q:gsub("[;&|/\\\\ ]", "") | |
local c = assert(io.popen("/usr/bin/pgrep -f "..arg_q)) |
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
<form id="donate_form" method="POST" action="/stripe/submit_form"> | |
<input type="button" id="submit" value="Submit >" onclick="submit_payment('form#donate_form')"> | |
</form> | |
function submit_payment(form) { | |
var $form = $(form); | |
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState === XMLHttpRequest.DONE) { |
OlderNewer