Skip to content

Instantly share code, notes, and snippets.

View Lewiscowles1986's full-sized avatar
🤓

Lewis Cowles Lewiscowles1986

🤓
View GitHub Profile
@Lewiscowles1986
Lewiscowles1986 / Dockerfile
Last active August 28, 2017 22:21
Firefox Nightly
#
# Firefox Dev Channel
#
# Inspired / assisted by:
#
# * https://hub.docker.com/r/minty/firefox/
# * https://github.com/mozilla/geckodriver/issues/285#issuecomment-325336816
#
FROM ubuntu:16.04
@Lewiscowles1986
Lewiscowles1986 / README.md
Last active August 24, 2017 19:20
Get PHP Software Project Functions

PHP Function Signature Dump

This project is part of an idea for using automated unattended shell scripts to track API's of Libre & OpenSource projects

It's a total pain in the ass to have a method signature change on you, and it would be lovely if there was some way to automatically update or notify source code when API's change (Imagine the time you could not be spending trawling docs)

The core concept is this

  • Projects:
    ProjectPK, RepoURL, Name, Flags
@Lewiscowles1986
Lewiscowles1986 / dhcpcd.sh
Created August 21, 2017 16:00
Raspberry pi stretch allow dhcpcd5 with /etc/network/interfaces
#!/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=""
@Lewiscowles1986
Lewiscowles1986 / README.md
Last active August 16, 2017 15:42
Remove Audio From Video Nautilus

Remove Audio From Video Nautilus

This is a Nautilus non-destructive action (created using the utility nautilus-actions) to allow using ffmpeg to remove the audio from any videos. I use this for my mobile phone video's because I can't keep my trap shut whilst filming

Installation

mkdir -p ~/.local/share/file-manager/actions
cd ~/.local/share/file-manager/actions
@Lewiscowles1986
Lewiscowles1986 / twelveFactorDB.php
Last active February 4, 2018 16:12
12-factor-app PHP DB URL parsing made simple
<?php
/**
* @license AGPL
* @license https://opensource.org/licenses/AGPL-3.0 GNU Affero General Public License
* @author "Lewis Cowles" <lewiscowles@me.com>
*/
/**
* small function that gets details from url using PHP built-in function
*
@Lewiscowles1986
Lewiscowles1986 / create-umbraco-pre-install.sql
Last active August 12, 2017 17:16
T-SQL To Create Umbraco Database with separate user
CREATE DATABASE [umbraco-cms];
USE [umbraco-cms];
CREATE LOGIN [Umbraco] WITH PASSWORD = 'mdfS8ryyjwvxhx}r.mdyPjoOms';
ALTER LOGIN [Umbraco] WITH DEFAULT_DATABASE = [umbraco-cms];
ALTER LOGIN [Umbraco] WITH PASSWORD = 'mdfS8ryyjwvxhx}r.mdyPjoOms';
ALTER LOGIN [Umbraco] ENABLE;
GRANT CREATE TABLE TO [Umbraco];
GRANT CREATE VIEW TO [Umbraco];
GRANT SELECT TO [Umbraco];
GRANT DELETE TO [Umbraco];
@Lewiscowles1986
Lewiscowles1986 / keybase.md
Last active August 7, 2017 20:13
keybase.md

Keybase proof

I hereby claim:

  • I am lewiscowles1986 on github.
  • I am lewiscowles (https://keybase.io/lewiscowles) on keybase.
  • I have a public key ASCxobwEYWr9XGyPH5KHryLohHb8gnYBHeHlfoKcOIBMrQo

To claim this, I am signing this object:

@Lewiscowles1986
Lewiscowles1986 / redirection.function.php
Last active October 24, 2019 07:25
PHP Redirect PHP, JS, HTML Meta Tag
<?php
const OPTION_DEFAULTS = [
'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
Lewiscowles1986 / keyboard-gallery-controls.js
Last active July 5, 2017 14:45
Keyboard Gallery Navigation