Skip to content

Instantly share code, notes, and snippets.

View silverfoxy's full-sized avatar
🦊
fox

Silverfoxy silverfoxy

🦊
fox
View GitHub Profile
@silverfoxy
silverfoxy / tmux.conf
Created February 23, 2024 20:57
tmux.conf
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tpm'
# --- Theme
set -g @catppuccin_flavour 'frappe'
@silverfoxy
silverfoxy / loader.php
Created January 3, 2022 22:19
Loader for multiple PHP files in php.ini prepend_file
<?php
require 'start_xdebug_reqbasedlogging.php';
require 'logeverything.php';
@silverfoxy
silverfoxy / logeverything.php
Last active January 5, 2022 06:42
Extended logs
<?php
// gather_logs();
function gather_logs() {
if (!isset($_SESSION)) { session_start(); }
$session_keys = array_keys($_SESSION);
$session = [];
foreach ($session_keys as $key) {
@silverfoxy
silverfoxy / start_xdebug_reqbasedlogging.php
Created January 3, 2022 21:15
Entry point based logging for Less is More
<?php
//xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
xdebug_start_code_coverage();
//error_log('starting coverage (main)' . $_SERVER["SCRIPT_FILENAME"]);
function shutdown_ashd9va()
{
// Registering shutdown function inside shutdown function
// is a trick to make this function be called last!
register_shutdown_function('shutdown_kdnw92j');
FROM debian:buster
LABEL name "Brave pagegraph on Debian"
RUN apt update &&\
apt install git curl -y
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt update &&\
apt install -y nodejs
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
@silverfoxy
silverfoxy / AutoKey CapsLock WASD Arrow
Last active November 10, 2021 17:18
AutoKey CapsLock WASD Arrow
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
#SingleInstance FORCE ; Skip invocation dialog box and silently replace previously executing instance of this script.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;================================================================================================
; CapsLock processing. Must double tap CapsLock to toggle CapsLock mode on or off.
;================================================================================================

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@silverfoxy
silverfoxy / Notes
Created April 26, 2020 04:02
Backup Website & Db to Google Drive
https://taranjeet.cc/auto-backup-mysql-database-to-google-drive/
https://github.com/gdrive-org/gdrive/issues/426
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab