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 | |
# GTK+ and Firefox for Amazon Linux | |
# Written by Joseph Lawson 2012-06-03 | |
# http://joekiller.com | |
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/ | |
# chmod 755 ./gtk-firefox.sh | |
# sudo ./gtk-firefox.sh | |
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
The swap-window command is closest to what you want. | |
"Prefix :" (that is "Ctrl-B :" by default) brings you to the tmux-command prompt. There you enter: | |
swap-window -s 3 -t 1 | |
to let window number 3 and window number 1 swap their positions. | |
To swap the current window with the top window, do: | |
swap-window -t 0 |
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
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6 | |
# rpm | |
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \ | |
-O jdk-7-linux-x64.rpm | |
# ubuntu |
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
<?php | |
/** | |
* http://culttt.com/2012/10/01/roll-your-own-pdo-php-class/ | |
*/ | |
?> | |
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
<?php | |
// Define database configuration | |
define("DB_HOST", $dblocation); | |
define("DB_USER", $dbusername); | |
define("DB_PASS", $dbpassword); | |
define("DB_NAME", $dbname); | |
class Database{ | |
private $host = DB_HOST; |
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
Model:: | |
/*Select*/ | |
select('col1','col2') | |
->select(array('col1','col2')) | |
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating')) | |
->addSelect('col3','col4') | |
->distinct() // distinct select | |
/*From*/ |
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 | |
# Took me awhile to figure out how to install utserver on Centos 7 x86_64... Especially with the new systemd subsystem. None of the builds I saw support it - but it will work with a couple symlinks and compatibility packages. | |
yum install glibc libgcc openssl krb5-libs libcom_err zlib keyutils-libs libselinux glibc glibc.i[36]86 libgcc libgcc.i[36]86 openssl openssl.i[36]86 krb5-libs krb5-libs.i[36]86 libcom_err libcom_err.i[36]86 zlib zlib.i[36]86 keyutils-libs keyutils-libs.i[36]86 libselinux libselinux.i[36]86 openssl098e-0.9.8e-29.el7.centos.2.i686 -y | |
ln -s /usr/lib/libssl.so.0.9.8e /lib/libssl.so.0.9.8 | |
ln -s /usr/lib/libcrypto.so.0.9.8e /lib/libcrypto.so.0.9.8 | |
mkdir /var/utserver | |
wget -O /var/utserver/utorrent-server-3.0-25053.tar.gz http://download.utorrent.com/linux/utorrent-server-3.0-25053.tar.gz | |
cd /var/utserver/ | |
tar zxf utorrent-server-3.0-25053.tar.gz | |
mv /var/utserver/utorrent-server-v3_0/* /var/utserver/ |
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
# changes from http://www.cyberciti.biz/faq/linux-kernel-etcsysctl-conf-security-hardening/ | |
# Protect ICMP attacks | |
net.ipv4.icmp_echo_ignore_broadcasts = 1 | |
# Turn on protection for bad icmp error messages | |
net.ipv4.icmp_ignore_bogus_error_responses = 1 | |
# Turn on syncookies for SYN flood attack protection | |
net.ipv4.tcp_syncookies = 1 |
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
#!/usr/bin/env python | |
""" | |
Synchronise block devices over the network | |
Copyright 2006-2008 Justin Azoff <[email protected]> | |
Copyright 2011 Robert Coup <[email protected]> | |
License: GPL | |
Getting started: |
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
#!/usr/bin/env python | |
""" | |
Synchronise block devices over the network | |
Copyright 2006-2008 Justin Azoff <[email protected]> | |
Copyright 2011 Robert Coup <[email protected]> | |
License: GPL | |
Getting started: | |
OlderNewer