Skip to content

Instantly share code, notes, and snippets.

View Carve's full-sized avatar
🏠
Working from home

CJ Ratliff Carve

🏠
Working from home
View GitHub Profile
@Hardikanand1st
Hardikanand1st / Power iso Serial keys.txt
Last active May 18, 2024 17:31
power iso Serial Keys
===============================================================================
User Name-: Hardik
Registration code :- TZXZT-USMCB-ZRKYP-MTVG3-JM8UL
===============================================================================
@pduchnovsky
pduchnovsky / optimize.sh
Last active December 11, 2023 11:40
Image size optimization for webpages jpg/png | https://duchnovsky.com/2020/11/images-optimization-for-web/
#!/bin/bash
# Script adapted by pduchnovsky
# https://duchnovsky.com/2020/11/images-optimization-for-web/
# Add list of folder names to ignore array here, separated by space
ignore=("./themes/*" "./resources/*" "./assets/*")
# Array of png optimizers with their arguments
optimizers=(
"optipng -nb -nc"
#!/bin/local/bash
# cfan.sh
# Manaual control over fans in PfSense (FreeBSD) on a Dell PowerEdge R210 ii system
# Original script: https://www.garron.me/en/bits/specify-editor-crontab-file.html
# Install:
# sudo pkg install bash && sudo pkg install ipmitool
# Add ipmi_load="YES" to /boot/loader.conf
# Add this script to /usr/bin/
# Add * * * * * /usr/local/bin/bash /usr/bin/cfan.sh to cron file with sudo crontab -e
# Reboot
@lyrixx
lyrixx / HardCoreDebugLogger.php
Last active April 27, 2024 14:09
Hardcore Debug Logger
<?php
const STREAM_OPEN_FOR_INCLUDE = 128;
final class HardCoreDebugLogger
{
public static function register(string $output = 'php://stdout')
{
register_tick_function(function () use ($output) {
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active May 10, 2024 18:47
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@realrashid
realrashid / Install PHP-CS-Fixer.md
Last active May 21, 2024 17:37
How to Install PHP-CS-Fixer on Windows

Installing PHP-CS-Fixer for VsCode on Windows

Install PHP-CS-FIXER Using Composer

composer global require friendsofphp/php-cs-fixer

after successfully installation of PHP-CS-FIXER

now install PHP-CS-FIXER VSCODE Extension

@yunusga
yunusga / gist:33cf0ba9e311e12df4046722e93d4123
Created April 5, 2017 11:55
Debug WordPress 404 issues (permalinks, rewrite rules, etc.)
/* Produces a dump on the state of WordPress when a not found error occurs */
/* useful when debugging permalink issues, rewrite rule trouble, place inside functions.php */
ini_set( 'error_reporting', -1 );
ini_set( 'display_errors', 'On' );
echo '<pre>';
add_action( 'parse_request', 'debug_404_rewrite_dump' );
function debug_404_rewrite_dump( &$wp ) {
@0xjac
0xjac / private_fork.md
Last active May 22, 2024 11:28
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@julianxhokaxhiu
julianxhokaxhiu / pagespeed_optimize_images.sh
Last active May 23, 2024 08:34
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/bin/bash
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462
find . -type f -iname "*.png" -exec optipng -nb -nc {} \;
find . -type f -iname "*.png" -exec advpng -z4 {} \;
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \;
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory