Skip to content

Instantly share code, notes, and snippets.


Lewis Cowles Lewiscowles1986

Block or report user

Report or block Lewiscowles1986

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Lewiscowles1986 / Dockerfile
Last active Jan 3, 2020
Bigcommerce Stencil Dockerfile
View Dockerfile
FROM ubuntu:xenial
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update -qq
RUN apt-get install -y -qq git curl python python-pip build-essential
RUN pip install virtualenv
ENV NVM_DIR /usr/local/nvm
View fullstory-org-code-js-input-helper.part.html
<script type="text/javascript">
(function() {
* Helper to extract FullStory Org code from URL when used in a HTML input element
const SCHEME_INDICATOR = '://';
document.querySelector('#fullstory_org_code').addEventListener('input', function(event) {
Lewiscowles1986 /
Last active Dec 12, 2019
Raspberry Pi 3 access-point-setup
# This version uses September 2017 august stretch image, please use this image
if [ "$EUID" -ne 0 ]
then echo "Must be root"
Lewiscowles1986 / script.js
Last active Nov 10, 2019
Prev Next JS injection
View script.js
* Used via
* to embed JS in all web-pages that are compliant to enable keyboard-navigation of blog posts
(function() {
window.addEventListener('keydown', function(e) {
switch(e.key) {
case 'Left': // IE11 BS
case 'ArrowLeft':
var link = document.querySelector('a[rel="prev"], .prev, #previtem');
View .bashrc
export EDITOR="code --wait"
# export EDITOR="codium --wait"
# export EDITOR="atom --wait"
# export EDITOR="nano --wait"
# export EDITOR="vi --wait"
# export EDITOR="sublime --wait"
Lewiscowles1986 /
Last active Nov 8, 2019
Raspberry Pi PHP7, Nginx 1.9 Installer
if [ "$EUID" -ne 0 ]
then echo "Must be root"
apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
Lewiscowles1986 / redirection.function.php
Last active Oct 24, 2019
PHP Redirect PHP, JS, HTML Meta Tag
View redirection.function.php
'lang' => 'en',
'meta' => true,
'js' => true,
'title' => 'Redirection notice',
'link_sentence' => 'If you are not redirected automatically, follow <a href="%s">%s</a>',
'link_label' => 'this link',
'head_extra' => '<link rel="stylesheet" href="/css/style.css" />',
Lewiscowles1986 /
Last active Sep 3, 2019
install ralink 7601U USB N+150 wireless driver (Ubuntu 14.04 or Kernel 3.13+)
#setup dependencies
sudo apt-get install --reinstall linux-headers-generic build-essential
#get patched drivers
wget -O - | tar -x
cd MT7601U-14.04-patched
# build and install
Lewiscowles1986 / dh-diagram.svg
Last active Apr 27, 2019
SSH with asymmetric key UML Sequence
View dh-diagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Lewiscowles1986 /
Last active Apr 17, 2019
Playstation 2 EU USB "The Buzz" controller

"The Buzz" Playstation 2 EU USB controller

Using tool "Simple HID Write"

  • W: Write
  • R: Read
W 00 {FF} 00 00 00 // controller 1 red light activate
W 00 {00} 00 00 00 // controller 1 red light deactivate
You can’t perform that action at this time.