23 Jan 2012
Command | Description |
---|---|
csf -s | Start the firewall rules |
csf -f | Flush/Stop firewall rules (note: lfd may restart csf) |
var buttons; | |
buttons = document.getElementsByClassName('_42ft'); | |
for (var i = 0; i < buttons.length; i++) { | |
if(buttons[i].getAttribute('ajaxify') != null){ | |
if(buttons[i].getAttribute('ajaxify').indexOf('invite') != -1){ | |
buttons[i].click(); | |
} | |
} | |
} |
23 Jan 2012
Command | Description |
---|---|
csf -s | Start the firewall rules |
csf -f | Flush/Stop firewall rules (note: lfd may restart csf) |
#!/bin/bash | |
# | |
# description: Apache Tomcat init script | |
# processname: tomcat | |
# chkconfig: 234 20 80 | |
# | |
# | |
# Copyright (C) 2014 Miglen Evlogiev | |
# | |
# This program is free software: you can redistribute it and/or modify it under |
#!/bin/bash | |
TOMCAT=apache-tomcat-7.0.23 | |
TOMCAT_WEBAPPS=$TOMCAT/webapps | |
TOMCAT_CONFIG=$TOMCAT/conf/server.xml | |
TOMCAT_START=$TOMCAT/bin/startup.sh | |
TOMCAT_ARCHIVE=$TOMCAT.tar.gz | |
TOMCAT_URL=http://apache.mirrorcatalogs.com/tomcat/tomcat-7/v7.0.23/bin/$TOMCAT_ARCHIVE | |
WAR_FILE=whatever.war |
#!/bin/bash | |
## uploading to google | |
## rev: 22 Aug 2012 16:07 | |
det=`date +%F` | |
browser="Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0.1" | |
username="[email protected]" | |
password="password" | |
accountype="HOSTED" #gooApps = HOSTED , gmail=GOOGLE |
Download Oracle Java JRE & JDK using a script | |
Oracle has recently disallowed direct downloads of java from their servers (without going through the browser and agreeing to their terms, which you can look at here: http://www.oracle.com/technetwork/java/javase/terms/license/index.html). So, if you try: | |
wget "http://download.oracle.com/otn-pub/java/jdk/7u4-b20/jdk-7u4-linux-x64.tar.gz" | |
you will receive a page with "In order to download products from Oracle Technology Network you must agree to the OTN license terms" error message. | |
This can be rather troublesome for setting up servers with automated scripts. |
#!/bin/bash -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |
#!/bin/bash | |
SCRIPT_VERSION=0.4.60 | |
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" | |
################################################################################# | |
#Copyright (C) 2007 Free Software Foundation. | |
#This program is free software; you can redistribute it and/or modify | |
#it under the terms of the GNU General Public License as published by |
<?php | |
/* | |
* Mysql database class - only one connection alowed | |
*/ | |
class Database { | |
private $_connection; | |
private static $_instance; //The single instance | |
private $_host = "HOSTt"; | |
private $_username = "USERNAME"; | |
private $_password = "PASSWORd"; |
var fullDate = new Date() | |
console.log(fullDate); | |
//Thu Otc 15 2014 17:25:38 GMT+1000 {} | |
//convert month to 2 digits | |
var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) :(fullDate.getMonth()+1); | |
var currentDate = fullDate.getDate() + "/" + twoDigitMonth + "/" + fullDate.getFullYear(); | |
console.log(currentDate); | |
//15/10/2014 |