Skip to content

Instantly share code, notes, and snippets.

View ScottJWalter's full-sized avatar
🔮
Particle. Wave. It's all data.

Scott J. Walter ScottJWalter

🔮
Particle. Wave. It's all data.
View GitHub Profile
@ScottJWalter
ScottJWalter / miniconda_on_rpi.md
Created September 5, 2018 22:19 — forked from simoncos/miniconda_on_rpi.md
Install Miniconda 3 on Raspberry Pi
/**
* 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 {
@ScottJWalter
ScottJWalter / lambda-dynamodb-scan
Created September 21, 2018 21:46 — forked from markusklems/lambda-dynamodb-scan
Short aws lambda sample program that scans a dynamodb table
// 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) {
@ScottJWalter
ScottJWalter / adding_new_webhook_topics.php
Created October 6, 2018 18:18 — forked from jessepearson/adding_new_webhook_topics.php
How to add a new custom Webhook topic in WooCommerce, with example of order filtering.
<?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.
@ScottJWalter
ScottJWalter / Ionic Android Development on WSL.md
Created November 2, 2018 22:41 — forked from fedme/Ionic Android Development on WSL.md
Ionic Android Development on WSL (Windows Subsystem for Linux)

Ionic Android Development on WSL

Installing the required software

Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:

cd ~
sudo apt update
sudo apt upgrade
@ScottJWalter
ScottJWalter / class.endpoint.php
Last active November 9, 2018 13:13 — forked from claudiosanches/custom-my-account-endpoint.php
PHP Class that wraps creating custom "My Account" endpoints inside WooCommerce
<?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
@ScottJWalter
ScottJWalter / debian_upgrade.yml
Created January 5, 2019 21:34 — forked from maethor/debian_upgrade.yml
Ansible playbook to update and upgrade Debian hosts
---
- 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)
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)
@ScottJWalter
ScottJWalter / gitclone-nonempty.sh
Created March 20, 2019 23:30 — forked from damondouglas/gitclone-nonempty.sh
Git clone into non-empty directory
git clone --no-checkout [email protected]:<path>.git tmp
mv tmp/.git .
rm -rf tmp
git reset --hard HEAD
@ScottJWalter
ScottJWalter / fabfile.py
Last active January 22, 2024 10:50 — forked from joshkehn/fabfile.py
Fabric api to upgrade or freeze pip packages
from fabric.api import local
import pip
def freeze ():
local("pip freeze > requirements.txt")
local("git add requirements.txt")
local("git commit -v")
def upgrade ():
for dist in pip.get_installed_distributions():