Skip to content

Instantly share code, notes, and snippets.

@kevincolten
kevincolten / wordpress-aws.sh
Created April 11, 2018 15:01
Wordpress AWS Notes
aws s3 sync ~/Documents/uploads/ s3://rcrwireless.com/wp-content/uploads
@kevincolten
kevincolten / my.cnf
Created December 17, 2017 07:08
MAMP max_allowed_packet
# This files lives at /MAMP/conf
[mysqld]
max_allowed_packet = 100M
@kevincolten
kevincolten / colors.scss
Last active December 15, 2017 03:10
Color Tachyons
$blue: #0026FF;
$red: #FF0000;
$yellow: #F2FF00;
$colors: (
blue: $blue,
red: $red,
yellow: $yellow
);
@kevincolten
kevincolten / app.js
Last active December 9, 2017 20:47
React TODO
import React, { Component } from 'react';
import { connect, Provider } from 'react-redux';
import { createStore, combineReducers } from 'redux';
import ReactDOM from 'react-dom';
import { ListGroup, ListGroupItem, Card, CardTitle, CardBody, CardFooter } from 'reactstrap';
// +----------------+
// | |
// | ACTIONS |
// | |
@kevincolten
kevincolten / ssh.sh
Created September 22, 2017 15:41
Run Command Over SSH with password bypass fingerprint prompt
sudo apt-get update
sudo apt-get install sshpass
sshpass -p your_password ssh -oUserKnownHostsFile=/dev/null user@hostname
@kevincolten
kevincolten / vpn.md
Last active September 4, 2018 03:32
Setting up PIA and OpenVPN on a Raspberry Pi
  1. sudo apt-get update

  2. sudo apt-get upgrade -y

  3. sudo apt-get install openvpn unzip dnsutils geoip-bin -y

  4. (mkdir openvpn && cd openvpn && unzip ../openvpn.zip)

  5. ( echo username; echo password; ) | tee /home/pi/openvpn/pass.txt

  6. ( echo auth-user-pass pass.txt; echo auth-nocache;) | tee --append US\ East.ovpn

  7. sudo nano /etc/init.d/VPNConnection

#! /bin/sh
@kevincolten
kevincolten / GrovePi.md
Last active July 17, 2017 21:58
Motion camera

Receive email if movement

  1. Download Raspbian Jessie Lite
  2. Use Etcher to burn OS image to SD Card
  3. Install motion-mmal
sudo apt-get install -y libjpeg-dev libavformat56 libavformat-dev libavcodec56 libavcodec-dev libavutil54 libavutil-dev libc6-dev zlib1g-dev libmysqlclient18 libmysqlclient-dev libpq5 libpq-dev
wget https://www.dropbox.com/s/6ruqgv1h65zufr6/motion-mmal-lowflyerUK-20151114.tar.gz
tar -zxvf motion-mmal-lowflyerUK-20151114.tar.gz
This file has been truncated, but you can view the full file.
# hpHosts - Ad and Tracking servers only
#
# The following are hosts in the hpHosts database with the ATS classification ONLY.
# This file will NOT protect you against malicious domains
#
127.0.0.1 localhost #IPv4 localhost
::1 localhost #IPv6 localhost
#
# AD SERVERS START HERE
#
@kevincolten
kevincolten / index.html
Created May 30, 2017 00:39
React Example
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Welcome</title>
</head>
<body>
<div id="welcome">
</div>
@kevincolten
kevincolten / failingTerm.sql
Last active April 27, 2017 18:53
Campus Manager Queries
SELECT
weighted.first_name,
weighted.last_name,
weighted.phone,
weighted.username,
weighted.term,
weighted.course,
weighted.city,
ROUND(SUM(weighted.score), 0) as score
FROM (