Skip to content

Instantly share code, notes, and snippets.

View jvgreenaway's full-sized avatar
🍕
Eatiing pizza

James Greenaway jvgreenaway

🍕
Eatiing pizza
View GitHub Profile
@w33ble
w33ble / docker-compose.advanced.yml
Last active August 1, 2023 13:37
Using jwilder/nginx-proxy with multiple compose files
version: '3'
services:
nginx-proxy:
image: nginx:alpine
container_name: proxy-nginx
environment:
- DEFAULT_HOST=hello.local
ports:
- 80:80
@altynbek07
altynbek07 / README.md
Last active March 25, 2022 22:42
Switch PHP Version in Laravel Valet

Switch PHP Version in Laravel Valet

For me, the valet use php@7.3 command does not work. And so I created this bash function.

Install

I already have PHP versions 7.2, 7.3 and 7.4 installed via Homebrew. Add this function in your .bash_profile or .zshrc file:

# Switch PHP version
switch-php() {
@woudsma
woudsma / dokku-kirby-autogit.md
Last active May 15, 2021 17:32
Dokku + Kirby + AutoGit

TL;DR

  • Configure Kirby for Dokku
  • Install deployment-keys and host keys Dokku plugins
  • Set up staging and production environments
  • Clone project repository into apps persistent storage folders
  • Mount desired folders including .git folder to apps
  • Add GIT_DIR and GIT_WORK_TREE environment variables to containers
  • Deploy to Dokku
@subzero79
subzero79 / Clean source
Last active October 12, 2022 01:14
Sonarr post processing script to clean video files if the source is rar (packed) content
#!/bin/bash
#sonarr_episodefile_sourcefolder="/torrent/finish/tv-sonarr/Penny.Dreadful.S01E01.720p.HDTV.x264-2HD"
#sonarr_episodefile_sourcepath="/torrent/finish/tv-sonarr/Penny.Dreadful.S01E01.720p.HDTV.x264-2HD/penny.dreadful.s01e01.720p.hdtv.x264-2hd.mkv"
sonarr_label="tv-sonarr"
base_dir=$(basename $sonarr_episodefile_sourcefolder)
if [ "${base_dir}" == "${sonarr_label}" ];then
echo "Single file torrent"

Sparky- tiny unicode sparklines

Try them in a table!

product price trend
widgets 4.37 ⠉⠉⢄⡠⠤⢄⣀⠤
@tejacques
tejacques / HOCBaseRender.tsx
Last active May 2, 2022 13:05
React Higher Order Components in TypeScript
import * as React from 'react';
import { Component } from 'react';
export default function HOCBaseRender<Props, State, ComponentState>(
Comp: new() => Component<Props & State, ComponentState>) {
return class HOCBase extends Component<Props, State> {
render() {
return <Comp {...this.props} {...this.state}/>;
}
}
@dmytro
dmytro / generate_openvpn_config.sh
Last active March 19, 2023 12:21
Script for OpenVPN generate client config file.
#!/bin/bash
# Easy script to create OpenVPN client configuration with the user, pre-generating user's
# RSA key and certificate.
#
# Configuration template must exist in the same directory, with only missing part: certificates.
#
# (c) Dmytro Kovalov, 2015
#
cd $(dirname ${BASH_SOURCE[0]})
@yann2192
yann2192 / hardening_usbarmory.md
Last active November 22, 2023 11:36
Hardening USB Armory

Hardening the USB Armory

As a good crypto nerd, I usually use an entirely encrypted linux FS: / but also /boot using grub LUKS support. It's a good setup but it's not perfect, the BIOS and the bootloader are not protected.

I recently got a USBArmory and I wanted to apply the same (or a better) setup.

I found some useful links but no clear howto. So this is my setup.

@limingjie
limingjie / xfce4.arch.vmware.md
Last active January 17, 2016 21:04
Install Gnome/Xfce4 on Archlinux (VMware)

###Install X Server

$ sudo pacman -S xorg-server

###Install VMware Drivers

$ sudo pacman -S open-vm-tools xf86-video-vmware xf86-input-vmmouse
@tkafka
tkafka / LICENSE.txt
Last active September 5, 2019 13:38
Drop-in replacement for ReactCSSTransitionGroup that uses velocity.js instead of CSS transforms. Add your own transitions to `transitions` hash.
The MIT License (MIT)
Copyright (c) 2014 Tomas Kafka
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: