To make case-insensitive, add -i
to all grep
and git log
commands
Search for "Telescope" (case sensitive) in all diffs in a repo
$ git log -STelescope
Result is something like this:
# 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 |
#!/bin/zsh | |
# sync a fork using the upstream branch | |
gfu(){ | |
BRANCH="$1" | |
if [ -z "$1" ]; then | |
BRANCH="master" | |
fi | |
# 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 |
<?php | |
/***** | |
If you have PHP installed, run this from the command line: | |
php scrape_ign_fortnite_map_tiles.php | |
**/ | |
ini_set('memory_limit','2048M'); |
Public Function BASE64SHA1(ByVal sTextToHash As String) | |
Dim asc As Object | |
Dim enc As Object | |
Dim TextToHash() As Byte | |
Dim SharedSecretKey() As Byte | |
Dim bytes() As Byte | |
Const cutoff As Integer = 5 | |
Set asc = CreateObject("System.Text.UTF8Encoding") |
# 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]? " |
# First are the color variables | |
# Second is a function that will test the colors on your machine (tested on bash and zsh on macOS) | |
# Some terminals/OS's have weird inconsistencies with the escape codes, | |
# so google will be your friend if this doesn't work quite right | |
# | |
# You can copy/paste these into your .bashrc or similar file | |
# Don't forget to source the file again or restart your terminal session to apply! | |
# Normal Colors | |
export Black='\033[0;30m' # Black |
## Add multi and setmulti | |
!commands add !multi Multi-Stream Link: http://kadgar.net/live/$(channel) | |
!commands add !setmulti -ul=moderator -a=!commands edit !multi Multi-Stream Link: http://kadgar.net/live/$(channel)/$(query) | |
# usage: !setmulti other_stream/another_stream |
// Only used to create the .shortcut file | |
const fs = require('fs'); | |
const { | |
buildShortcut, | |
} = require('./'); | |
const { | |
comment, | |
createAlarm, | |
} = require('./actions'); |