Skip to content

Instantly share code, notes, and snippets.

Avatar

Lawrence Cherone lcherone

View GitHub Profile
@lcherone
lcherone / cloud9-lamp.sh
Last active May 8, 2018
Cloud9 / C9 SDK - Bash script which installs Cloud9 SDK, with Apache2 (rewrite, headers enabled), PHP7, MariaDB, Git, Composer, nodejs, npm and start on boot crontab.
View cloud9-lamp.sh
#!/bin/bash
# Set envioroment, for cloud-init
set -e
export DEBIAN_FRONTEND=noninteractive
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin'
export HOME='/root'
# upon launch wait for internet connection
echo "Waiting for network connection."
@CalebEverett
CalebEverett / events-websock.js
Last active Jul 14, 2020
Lxd api example: lxc exec and operations websocket via nodejs
View events-websock.js
const fs = require('fs')
const WebSocket = require('ws');
const wsoptions = {
cert: fs.readFileSync('../../.config/lxc/client.crt'),
key: fs.readFileSync('../../.config/lxc/client.key'),
rejectUnauthorized: false
}
var ws = new WebSocket('wss://127.0.0.1:8443/1.0/events?type=operation', wsoptions);
@lcherone
lcherone / htaccessCRUD.class.php
Last active Sep 4, 2018
PHP .htaccess CRUD class
View htaccessCRUD.class.php
<?php
/**
* .htaccess writer CRUD class
*
* @author Lawrence Cherone
* @version 1.00
*/
class htaccessCRUD
{
public $file;
View deploy.php
<?php
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php
/**
* The root directory where the repos live.
*
* @var string
*/
$root_dir = '/your/root/dir/';
View disposable-email-provider-domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com