This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sync a fork using the upstream branch | |
# usage: gfu [branch-name (default: master)] | |
gfu(){ | |
BRANCH="$1" | |
if [ -z "$1" ]; then | |
BRANCH="master" | |
fi | |
echo -n "Fetch and merge upstream for branch $BWhite$BRANCH$NC? [y/N]? " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -f -n 450 storage/logs/laravel*.log \ | |
| grep -i -E \ | |
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \ | |
--color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This sets the variable $IPADDR to the IP address the new Linode receives. | |
IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://') | |
sudo yum update -y | |
sudo yum install nginx wget git -y | |
cd ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/***** | |
If you have PHP installed, run this from the command line: | |
php scrape_ign_fortnite_map_tiles.php | |
**/ | |
ini_set('memory_limit','2048M'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use these on the command line to generate random strings | |
# Tested in CentOS and macOS | |
# All printable characters | |
head /dev/urandom | LC_CTYPE=C tr -dc "[:print:]" | head -c 32 | |
# Only A-Za-z0-9 | |
head /dev/urandom | LC_CTYPE=C tr -dc "A-Za-z0-9" | head -c 32 | |
# Alphanum with some special characters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# sync a fork using the upstream branch | |
gfu(){ | |
BRANCH="$1" | |
if [ -z "$1" ]; then | |
BRANCH="master" | |
fi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Remove Laravel Comments | |
|-------------------------------------------------------------------------- | |
| | |
| Just made a new Laravel project, but don't want all those big | |
| comment blocks? Put this in the root of your project and run | |
| "php remove_laravel_comments.php" | |
| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This will look at the overviewstatus.xml file and | |
# determine if Backblaze is currently transmitting a file. | |
# | |
# Developed against: | |
# macOS 10.13.3 | |
# Backblaze 5.2.0.172 | |
BBSTATUS='/Library/Backblaze.bzpkg/bzdata/overviewstatus.xml' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Many of these customizations are from | |
# http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ | |
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# split panes using | and - | |
bind | split-window -h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete files based on a pattern | |
# The example below removes PDF files in nested directories, such as ./50/round_2/foo.pdf | |
# but would NOT remove the file ./50/packages/foo.pdf | |
find . -regextype posix-extended -regex ".*/round.*\.pdf" -exec rm {} + | |
# Delete a history item by its ID | |
history # get the ID (left-hand number) for the item you want to remove | |
history -d item_number | |
# Delete keys in redis matching some pattern, atomically |