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 /
Last active Nov 20, 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
Lewiscowles1986 / script.js
Created May 20, 2018
Anonymous Upload images to Imgur V3 JS
View script.js
window.addEventListener('paste', function(e) {
function eventPreventDefault(e) {
function getClipboardData(e) {
return window.clipboardData || e.clipboardData;
Lewiscowles1986 /
Last active Mar 26, 2019
Replay against system to test stability

Utility to replay HTTP requests on a service

This utility helps replay a statistically significant number of HTTP requests against a service (serially) which are enough to give significance to two-decimal places.


replay-http {url} [{headers_path} {payload_path} {http_method}]


You can’t perform that action at this time.