Installed SSH for remote access.
sudo apt-get install openssh-server
Set networking as Bridged Adapter. In VirtualBox, Machine > Settings > Network > Attached To = "Bridged Adapter".
sudo reboot
$(function(){ | |
setInterval(function(){ | |
var divUtc = $('#divUTC'); | |
var divLocal = $('#divLocal'); | |
//put UTC time into divUTC | |
divUtc.text(moment.utc().format('YYYY-MM-DD HH:mm:ss')); | |
//get text from divUTC and conver to local timezone | |
var localTime = moment.utc(divUtc.text()).toDate(); | |
localTime = moment(localTime).format('YYYY-MM-DD HH:mm:ss'); |
import random | |
import datetime | |
from datetime import timedelta | |
import csv | |
col_count = 5 | |
num_items = 1000 | |
cur_date = datetime.datetime.now() | |
with open('timeseries.csv', 'wb') as csvfile: |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
""" | |
A script that backs up the database and sends the compressed output to an S3 bucket | |
""" | |
import os | |
import sys | |
import glob | |
import subprocess | |
import contextlib | |
import functools | |
import multiprocessing |
#!/bin/bash | |
# Script that checks the health status of a website and | |
# sends notifications if the website is unavailable. | |
HOST='website.com' | |
status=`curl -L -o /dev/null --silent --head --write-out '%{http_code}\n' $HOST` | |
if [ $status != 200 ]; then | |
echo "$HOST received a status of $status." | mail -s "$HOST is down" "johnsmith@gmail.com" | |
fi |
<?php | |
$current_config = __DIR__ . '/' . $_SERVER['HTTP_HOST'] . '.config.php'; | |
if (file_exists($current_config)) | |
require_once $current_config; | |
else { | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, |
_.list([1, 2, 3, 4, 5, 6, 7]).right(4).val() // 5 |
_.zipper([1, 2, 3, 4, 5, 6, 7]).right(4).left().val() // 4 |
doubleUs x y = doubleMe x + doubleMe y |