Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:
cd ~
sudo apt update
sudo apt upgrade
Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
To use: | |
1. Install [Ansible](https://www.ansible.com/) | |
2. Setup an Ubuntu 16.04 server accessible over ssh | |
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
--- | |
- hosts: all | |
sudo: yes | |
tasks: | |
- name: Update packages list | |
apt: update_cache=yes | |
when: ansible_os_family == 'Debian' | |
- name: List packages to upgrade (1/2) |
<?php | |
defined( 'ABSPATH' ) or exit; | |
class CUSTOM_WC_My_Account_Endpoint { | |
/** | |
* Properties | |
* | |
* @prop string $endpoint URI slug of endpoint | |
* @prop string $title Text to display on menu | |
* @prop callback $callback Display/Draw function to call |
<?php // do not copy this line | |
/** | |
* add_new_topic_hooks will add a new webhook topic hook. | |
* @param array $topic_hooks Esxisting topic hooks. | |
*/ | |
function add_new_topic_hooks( $topic_hooks ) { | |
// Array that has the topic as resource.event with arrays of actions that call that topic. |
// create an IAM Lambda role with access to dynamodb | |
// Launch Lambda in the same region as your dynamodb region | |
// (here: us-east-1) | |
// dynamodb table with hash key = user and range key = datetime | |
console.log('Loading event'); | |
var AWS = require('aws-sdk'); | |
var dynamodb = new AWS.DynamoDB({apiVersion: '2012-08-10'}); | |
exports.handler = function(event, context) { |
/** | |
* This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit. | |
* For additional samples, visit the Alexa Skills Kit developer documentation at | |
* https://developer.amazon.com/appsandservices/solutions/alexa/alexa-skills-kit/getting-started-guide | |
*/ | |
// Route the incoming request based on type (LaunchRequest, IntentRequest, | |
// etc.) The JSON body of the request is provided in the event parameter. | |
exports.handler = function (event, context) { | |
try { |
refer to: https://stackoverflow.com/questions/39371772/how-to-install-anaconda-on-raspberry-pi-3-model-b
{USER}: pi
Install Miniconda 3:
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-armv7l.sh
sudo md5sum Miniconda3-latest-Linux-armv7l.sh # (optional) check md5
sudo /bin/bash Miniconda3-latest-Linux-armv7l.sh # -> change default directory to /home/pi/miniconda3
#!/bin/bash | |
set -e | |
GVERSION="1.11" | |
GFILE="go$GVERSION.linux-amd64.tar.gz" | |
GOPATH="$HOME/projects/go" | |
GOROOT="/usr/local/go" | |
if [ -d $GOROOT ]; then | |
echo "Installation directories already exist $GOROOT" |
#!/bin/bash | |
# Set your VPN up with this guide: https://gist.github.com/superjamie/ac55b6d2c080582a3e64 | |
# This runs nicely on a Raspberry Pi that is setup to be your gateway. | |
# Requires: speedtest-cli, openvpn | |
# Assuming you have config files of: | |
# /etc/openvpn/newyork.conf | |
# /etc/openvpn/chicago.conf |