Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓

Lewis Cowles Lewiscowles1986

🤓
View GitHub Profile
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active Apr 7, 2021
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 / dh-diagram.svg
Last active Feb 18, 2021
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
Lewiscowles1986 / Dockerfile
Last active Jan 22, 2021
PhalconPHP 2.1 Vagrant & Docker for PHP7 build...
View Dockerfile
FROM ubuntu:16.04
RUN apt-get -y update && apt-get install -y php7.0-fpm php7.0-cli php7.0-curl php7.0-gd php7.0-intl php7.0-zip php7.0-pgsql build-essential git gcc make re2c libpcre3-dev php7.0-dev curl
RUN curl -sS http://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
RUN composer global require "phalcon/zephir:dev-master"
RUN mkdir -p /opt/www
@Lewiscowles1986
Lewiscowles1986 / README.md
Last active Jan 4, 2021
Playstation 2 EU USB "The Buzz" controller
View README.md

"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
Lewiscowles1986 / rPi3-mariadb-10.1.sh
Last active Nov 24, 2020
Raspberry Pi MariaDB 10.1 with Galera Cluster build
View rPi3-mariadb-10.1.sh
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
@Lewiscowles1986
Lewiscowles1986 / dhcpcd.sh
Created Aug 21, 2017
Raspberry pi stretch allow dhcpcd5 with /etc/network/interfaces
View dhcpcd.sh
#!/bin/sh -e
#
# This file belongs in /usr/lib/dhcpcd5/dhcpcd how you get it there is up to you
#
DHCPCD=/sbin/dhcpcd
INTERFACES=/etc/network/interfaces
REGEX="^[[:space:]]*iface[[:space:]](*.*)[[:space:]]*inet[[:space:]]*(dhcp|static)"
EXCLUDES=""
View benchmark-pc.c
// Integer and float benchmark for Win32 and Win64
// Results are below main(), line 91
#include <stdlib.h>
#include <stdio.h>
#ifdef _WIN32
#include <sys/timeb.h>
#else
#include <sys/time.h>
#endif
@Lewiscowles1986
Lewiscowles1986 / README.md
Last active Jun 13, 2020 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View README.md

Git Rename Script

This is a fork of https://gist.github.com/lttlrck/9628955 to make the renaming of branches simpler.

Usage

  1. Ensure the script is executable.
  2. git-rename.sh [oldbranchname] newbranchname [upstreamname]

conventions

@Lewiscowles1986
Lewiscowles1986 / grub.cfg
Last active May 14, 2020
multiboot USB Linux goodness
View grub.cfg
# This grub.cfg file was created by Lance http://www.pendrivelinux.com
# Suggested Entries and the suggestor, if available, will also be noted.
set timeout=10
set default=0
set gfxpayload=keep
submenu "Ubuntu" {
menuentry "Ubuntu Desktop ISO" {
set isofile=/ubuntu.iso
View install-vscodium-64-bit-update-after-download.sh
#!/bin/bash
sudo tar -xzf ~/Downloads/VSCodium-linux-x64*.tar.gz -C . && rm ~/Downloads/VSCodium-linux-x64*