View check-ftp.php
<?php
$host = 'example.com';
$password = 'pass';
$username = 'username';
try {
$result = checkFtp($host, $username, $password);
} catch(Exception $e) {
$result = $e->getMessage();
}
View deploy.rb
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*
View id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtoCHKm+G/ywvZvNkhXzUYXVLJGl6FYt+0dizFvcUNRsZmNZHjicBqOyAIRI4OSaACuMhaNJ9oakMLuZhdJxKETTZhRLmokRDgiTDBwItBLpM6NeLeFLpvj51vPllV6wqv6ybIb6sH3nuUkkeDrdkTOGB0uTXKKeU0ggzSWwUTEURQ6JdiQOgylmZ0WtK0PFjPykgDdikY/mGvKytgX2TizdMqbhF8YNuViRpV398QB+FFPkspm2jSpRAs7uEg53I14L1jde6NEJJMraIHSK5EnqFpJRRD+zc8VZ2+8jGtV6onQ9s+9kqPes7JyshkZwcndlT5539WJZ/Js1SHaH6Z fordnox
View plugin-enabler.sh
#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
View static_server.js
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
View RabbitRpc.php
<?php
use PhpAmqpLib\Connection\AMQPConnection;
use PhpAmqpLib\Message\AMQPMessage;
class RabbitRpc
{
const TIMEOUT = 15;
View latest.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div class="container">
<p>
<a href="#" class="release-download btnd btnd-1 btnd-1d">Download</a>
View fb_friends.py
import requests
import json
import urllib2
import webbrowser
from pprint import pprint
token = ''
api_url = 'https://graph.facebook.com/v2.1/'
params = {'access_token' : token}
View domain.conf
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
View date_range.php
<?php
private function _getDataRange($range)
{
$lowerdate = null;
$upperdate = null;
switch ($range) {
case 'today':
$lowerdate = date('Y-m-d 00:00:00');