Skip to content

Instantly share code, notes, and snippets.

View tegaphilip's full-sized avatar

Tega tegaphilip

View GitHub Profile
@tegaphilip
tegaphilip / deploy.php
Last active April 26, 2021 22:04
Deploying with Deployer PHP
<?php
// Note that you have to first install deployer (https://deployer.org/download)
// Then put this script at the root of your project
// To deploy to development, run `dep deploy development`
namespace Deployer;
require 'recipe/common.php';
// Servers
<?php
if (isset($_GET['offset'])) {
echo 'Your current timezone is ' . timezone_name_from_abbr('', $_GET['offset'] * 60, false);
exit;
}
?>
<html>
<head>
<title>MY TIMEZONE</title>
@tegaphilip
tegaphilip / fabfile.py
Last active December 11, 2016 11:21
Deployment Script for a flask app using Fabric
import json
import time
from fabric.api import *
from fabric.contrib.console import confirm
HOOK_URL = 'https://hooks.slack.com/services/XXXXXXXX/XXXXXX/XXXXXXXXXX'
env.key_filename = '/path/to/home/dir/.ssh/id_rsa'
branch = 'development'
code_dir = '/path/to/code/dir'
environment = 'development'