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
<?php | |
/** | |
* Generate all the possible combinations among a set of nested arrays. | |
* | |
* @param array $data The entrypoint array container. | |
* @param array $all The final container (used internally). | |
* @param array $group The sub container (used internally). | |
* @param mixed $val The value to append (used internally). | |
* @param int $i The key index (used internally). | |
*/ |
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
$ cat /etc/rc.local | |
/usr/local/bin/composer selfupdate > /dev/null 2>&1 |
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
create temporary table tmp( | |
client_id INT(11), | |
amount char(2) | |
); | |
INSERT INTO tmp | |
SELECT client_id, amount + 10 | |
FROM clients; | |
UPDATE clients as r |
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
#Download the latest java rpm from their site | |
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html | |
$ sudo dnf install jre-8u45-linux-x64.rpm | |
$ sudo alternatives --install /usr/bin/java java /usr/java/latest/bin/java 20000 | |
$ sudo alternatives --config java |
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
#Update any packages | |
$ yum update | |
#Upgrade to Fedora 22 | |
$ clear && \ | |
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-22-$(uname -i) && \ | |
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-free-fedora-22 && \ | |
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-fedora-22 && \ | |
yum -y update yum* && \ | |
yum clean all && \ |
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 | |
if [ "$1" == "-h" ] ; then | |
echo "Send a friendly weekly report of git commits to the specified email" | |
echo "Usage: `basename $0` [-h] recepient_email email_subject" | |
exit 0 | |
fi | |
if ! git ls-files >& /dev/null; then | |
echo "You can only run this command inside a git repository!" |
NewerOlder