Skip to content

Instantly share code, notes, and snippets.

View fordnox's full-sized avatar
🍕
Eating pizza

Andrius Putna fordnox

🍕
Eating pizza
View GitHub Profile
@fordnox
fordnox / plugin-enabler.sh
Created December 15, 2016 14:58
Enable cache plugin for wordpress
#install wp-cli on server https://github.com/wp-cli/wp-cli
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
#install cache plugin to wordpress
curl -O https://raw.githubusercontent.com/bluehost/endurance-page-cache/master/endurance-page-cache.php
#activate plugin
@fordnox
fordnox / deploy.rb
Created March 21, 2017 13:32
universal mina deploy script
require 'mina/rsync'
set :user, ENV['USER'] || 'username'
set :domain, ENV['DOMAIN'] || 'foobar.com'
set :deploy_to, ENV['DEPLOY_PATH'] || '/tmp/deploy'
set :branch, ENV['GIT_BRANCH'] || 'master'
set :repository, ENV['GIT_REPO'] || '.'
set :rsync_options, %w[
--recursive --delete --delete-excluded
--exclude .git*
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtoCHKm+G/ywvZvNkhXzUYXVLJGl6FYt+0dizFvcUNRsZmNZHjicBqOyAIRI4OSaACuMhaNJ9oakMLuZhdJxKETTZhRLmokRDgiTDBwItBLpM6NeLeFLpvj51vPllV6wqv6ybIb6sH3nuUkkeDrdkTOGB0uTXKKeU0ggzSWwUTEURQ6JdiQOgylmZ0WtK0PFjPykgDdikY/mGvKytgX2TizdMqbhF8YNuViRpV398QB+FFPkspm2jSpRAs7uEg53I14L1jde6NEJJMraIHSK5EnqFpJRRD+zc8VZ2+8jGtV6onQ9s+9kqPes7JyshkZwcndlT5539WJZ/Js1SHaH6Z fordnox
@fordnox
fordnox / jekins_server.sh
Created September 25, 2011 10:22
Install Jenkins server on Ubuntu
#!/bin/sh
sudo apt-get update
sudo apt-get install openjdk-6-jre
sudo apt-get install openjdk-6-jdk
sudo wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
sudo apt-get install ant
<?php
/**
* BoxBilling
*
* LICENSE
*
* This source file is subject to the license that is bundled
* with this package in the file LICENSE.txt
* It is also available through the world-wide-web at this URL:
* http://www.boxbilling.com/LICENSE.txt
@fordnox
fordnox / update.sh
Created April 22, 2013 16:57
sh script to update repository in current folder
#!/bin/sh
git reset --hard HEAD
git pull
git submodule update --init
@fordnox
fordnox / SLDs-array.php
Created April 10, 2013 07:21
Get array of all second-level-domains
<?php
$CsvString = file_get_contents('https://raw.github.com/gavingmiller/second-level-domains/master/SLDs.csv');
$Data = str_getcsv($CsvString, PHP_EOL);
foreach($Data as &$Row) {
list($tld, $stld) = str_getcsv($Row, ",");
$Row = $stld;
}
var_export($Data, true);
@fordnox
fordnox / gist:5284078
Created April 1, 2013 09:55
pear add-ons
#http://pear.phpunit.de/
sudo pear install phpunit/PHP_Invoker
sudo pear install phpunit/PHPUnit_Selenium
sudo pear install phpunit/PHPUnit_Story
@fordnox
fordnox / WebHook.php
Created December 3, 2012 13:07
WebHook notifier class
<?php
class WebHookEvent
{
private $name = null;
private $params = array();
public function setName($event)
{
$this->name = $event;
@fordnox
fordnox / svmserver.sh
Created July 27, 2012 12:31
Restart svn server deamon
#!/bin/sh
killall -9 svnserve
svnserve -d -r /var/repositories/