Skip to content

Instantly share code, notes, and snippets.

View RiFi2k's full-sized avatar

Reilly Lowery RiFi2k

View GitHub Profile
@michaelbutler
michaelbutler / Install_PHP_on_Arch_Manjaro.md
Last active February 28, 2024 09:09
Install multiple PHP versions on Arch / Manjaro Linux

Install Any PHP on Arch / Manjaro

Through the AUR it is possible to install older and newer PHP versions, simultaneously on the same system. I often had trouble installing using pacman and pamac so here's what I did:

mkdir -p $HOME/bin
mkdir ~/src
cd ~/src
git clone https://aur.archlinux.org/php81.git
cd php81
@megahirt
megahirt / Docker with XDebug.md
Last active April 9, 2024 11:55
Debugging PHP with XDebug v3 inside Docker using VSCode

Debugging PHP with XDebug v3 inside Docker using VSCode

Assumptions / Prerequisites

  • XDebug v3+ inside Docker (e.g. php:7.3-apache Docker image)
  • Running Docker v20.10+
  • VSCode with PHP Debug Extension (Felix Becker)
  • Using Docker Compose for orchestration

Objective

Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
import debounce from "lodash/debounce"
let localStorageAvailable = () => {
let test = 'test';
try {
localStorage.setItem(test, test);
localStorage.removeItem(test);
return true;
} catch(e) {
return false;
@davidgilbertson
davidgilbertson / http2.js
Last active October 9, 2023 06:09
HTTP2 server with compression and caching
const http2 = require('http2');
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const brotli = require('brotli'); // npm package
const PORT = 3032;
const BROTLI_QUALITY = 11; // slow, but we're caching so who cares
const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/');
const cache = {};
@conorbarclay
conorbarclay / GoogleMap.js
Last active August 19, 2018 07:41
WordPress + Google Map Workflow (using ACF field data)
/* global google */
import $ from 'jquery';
class GoogleMap {
constructor(el) {
this.el = $(el);
this.icon = {
path: 'M25,0C15.957,0,8.625,7.277,8.625,16.253C8.625,31.638,25,50,25,50s16.375-17.37,16.375-33.747 C41.375,7.277,34.044,0,25,0z M25,23.084c-3.383,0-6.125-2.742-6.125-6.125s2.742-6.125,6.125-6.125s6.125,2.742,6.125,6.125 S28.383,23.084,25,23.084z',
fillColor: '#ed1c2e',
fillOpacity: 1,
@X3MBoy
X3MBoy / nano-shorts.md
Created April 28, 2017 20:27 — forked from franz-josef-kaiser/nano-shorts.md
nano keyboard shortcuts

^ = Ctrl key M = Alt key

^G      (F1)            Display this help text
^X      (F2)            Close the current file buffer / Exit from nano
^O      (F3)            Write the current file to disk
^J      (F4)            Justify the current paragraph

^R      (F5)            Insert another file into the current one
@rickdaalhuizen90
rickdaalhuizen90 / .bashrc
Created February 12, 2017 17:20
Parrot Os bash theme for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@elerch
elerch / arch-usb-uefi.md
Last active January 26, 2024 22:20
Installation of Arch Linux on a USB stick with UEFI and legacy BIOS Support

Our goal here is to have one USB stick to rule them all. Objectives:

  • We want a full system - not a live CD
  • We want to boot this system on a Macbook Pro (requires UEFI)
  • We want to boot this system on a Acer C720 Chromebook (requires Legacy BIOS support)
  • We want the system "functional"

The last bullet is subject to interpretation, but I'm defining functional as:

  • X Windows works (with LXDE)