-
Simplest intro to git by github and codeschool - Try Git
-
[Intro to github]
#!/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 |
#!/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 {} \; |
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:
- 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
/* 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 ) { |
Follow the instructions on Github to Create an Access Token in Github
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:-
<?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); |
#!/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 |
#!/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" |