Skip to content

Instantly share code, notes, and snippets.

View Lewiscowles1986's full-sized avatar
🤓

Lewis Cowles Lewiscowles1986

🤓
View GitHub Profile
@Lewiscowles1986
Lewiscowles1986 / ConsCarCdr.js
Last active September 19, 2023 07:54 — forked from scotthaleen/ConsCarCdr.js
JavaScript implementation of cons, car and cdr
View ConsCarCdr.js
/**
* Generic Container, which can contain a single item, and the next item as a function
*/
function cons(value, next) {
return function wrap(wrapper) { return wrapper(value, next) };
};
/**
* Get value of item by calling unwrap function, taking value
*/
@Lewiscowles1986
Lewiscowles1986 / extract_har.py
Last active September 1, 2023 13:37 — forked from kafran/extract_har.py
Python 3 script to extract images from HTTP Archive (HAR) files
View extract_har.py
import json
import base64
import os
# make sure the output directory exists before running!
folder = os.path.join(os.getcwd(), "imgs")
with open("src.har", "r") as f:
har = json.loads(f.read())
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active July 16, 2023 15:33
Raspberry Pi 3 access-point-setup
View rPi3-ap-setup.sh
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@Lewiscowles1986
Lewiscowles1986 / Vagrantfile
Last active November 23, 2022 12:36
Magento 2 (Stable) Vagrant
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "debian/jessie64"
config.vm.network "private_network", ip: "10.0.0.7"
config.vm.hostname = "magento2.local"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
@Lewiscowles1986
Lewiscowles1986 / goes in config file
Created April 7, 2017 13:29
Mupen 64 Plus DragonRise N64 USB Joystick
View goes in config file
[Input-SDL-Control1]
# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number.
version = 2
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic
mode = 0
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number
device = 0
# SDL joystick name (or Keyboard)
name = "DragonRise Inc. Generic USB Joystick "
@Lewiscowles1986
Lewiscowles1986 / README.md
Last active May 21, 2022 15:15
Playstation 2 EU USB "The Buzz" controller
View README.md
@Lewiscowles1986
Lewiscowles1986 / Dockerfile
Last active May 7, 2022 12:18
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
ENV NODE_VERSION 4.1.2
@Lewiscowles1986
Lewiscowles1986 / dh-diagram.svg
Last active November 16, 2021 06:22
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.
View docker-compose.yml
version: '3.5'
services:
# LewisCowles local docker-compose partial for Minio/S3
minio:
image: minio/minio
ports:
- 9000:9000
restart: always
volumes:
- ./data/minio:/data