Skip to content

Instantly share code, notes, and snippets.

View christopheranderton's full-sized avatar

Christopher Anderton christopheranderton

View GitHub Profile
@christopheranderton
christopheranderton / wp-cli-update
Last active January 4, 2016 03:28
NOTE: This is a old Gist. It may work, but it can also be deprecated. | Update WP-CLI (WP-CLI itself, not a WordPress install).For use with your Terminal.app (or iTerm.app).
cd ~/.wp-cli
php composer.phar self-update
php composer.phar require 'wp-cli/wp-cli=@stable'
@christopheranderton
christopheranderton / css-font-setting-the-standards-way.css
Last active February 22, 2016 07:28
Note: This is a old Gist. It may be deprecated. | Standards CSS Font Feature Settings instead of non CSS standard optimizeLegibility. However, it seems that Blink-based browsers (Chrome and Opera) adds extra padding for every word, thus breaking some layouts (specially grid based ones and css menus). Firefox and WebKit (Safari) does not seems to…
/* While most people are using text-rendering: optimizeLegibility;
* in their projects for better text rendering, it's actually non
* standard CSS (it's a SVG property).
* The standard way is to use the font feature settings for OpenType.
* The snippet below replicates text-rendering: optimizeLegibility;
*------------------------------------------------------------------- */
-moz-font-feature-settings:"kern" 1, "liga" 1;
-moz-font-feature-settings:"kern=1, liga=1";
-ms-font-feature-settings:"kern" 1, "liga" 1;
@christopheranderton
christopheranderton / unicode-horizontal-row-shell.sh
Last active March 16, 2017 12:17
Prints a Funky Horizontal Row of a Unicode Character. Includes examples using lolcat and lolcat with animation. Great to add a little bling bling to your shell scripts.
## Prints a Horizontal Row of a Unicode Character
# Screenshot: http://imgur.com/a/Z2nKx
# Use for: Pattern or Separator
# Requirements: tput, Unicode font(s),
# True Color Terminal, LOLCAT (optional)
# Tested on OS X/macOS (10.11.6) and
# Ubuntu Linux (March 2017)
@christopheranderton
christopheranderton / mac-browsers-cli-search.sh
Last active May 3, 2017 13:34
Launch and Search Functions using different macOS / OS X browsers using the Terminal + Search Google Images in your default browser using from the CLI.
# For use in your .bash_profile or .functions file
# -------------------------------------------------
# Search using single words
# Example: gchrome terminal
# Search using multiple words
# Example: gchrome "wopr terminal"
# Launch browser of choice
# Example: gchrome
@christopheranderton
christopheranderton / forums.opera.com.css
Created November 5, 2017 21:38
Userstyle for Opera forums (November 2017). Quick & VERY dirty <== Work in progress
html, body, span, li, ul, table, td, tr, form, input, li ul, ul li, ol, button {
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantrell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
/* Hack-ish things for some browsers on Linux and Windows */
font-variant-ligatures: none;
-webkit-font-variant-ligatures: none;
text-rendering: optimizeLegibility;
font-smoothing: antialiased;
-webkit-font-smoothing: antialiased;
text-shadow: rgba(0, 0, 0, .01) 0 0 1px;
}
@christopheranderton
christopheranderton / mining-crap-hosts.txt
Last active December 18, 2017 15:16
Host entries to block some known mining domains. Should work in uBlock Origin as well. Updated at least once a month.
# MINERS & FRIENDS
# ------------------------------------------------------------
0.0.0.0 1beb2a44.space
0.0.0.0 1safe.link
0.0.0.0 2giga.li
0.0.0.0 2giga.link
0.0.0.0 300ca0d0.space
0.0.0.0 310ca263.space
0.0.0.0 320ca3f6.space
0.0.0.0 330ca589.space
@christopheranderton
christopheranderton / shady-nox-app-player-mac.txt
Created December 22, 2017 09:54
Shady Apps on Mac: NOX App Player for Mac EULA
We are committed to protecting your privacy while you use NOX APP PLAYER. The use of NOX APP PLAYER requires the collection and use of your Personal Information (defined below), and it is important for you to understand how your Personal Information is used. In using NOX APP PLAYER, you will be supplying us with your Personal Information.
By using NOX APP PLAYER, you agree that we (and our affiliate/subsidiary companies) will handle all Personal Information in accordance with this Privacy Policy, as revised from time to time. This Privacy Policy is incorporated into and forms part of the End User License Agreement that you have agreed to.
We regularly review this Privacy Policy and may from time to time revise or add specific instructions, policies and terms - such instructions, policies and terms form part of this Privacy Policy. Where any changes to this Privacy Policy are reasonably material to you, we will (where reasonably practicable) notify you. By continuing to use our services after any amendmen
@christopheranderton
christopheranderton / shutdown-restart-sleep-macosx.sh
Created October 19, 2017 18:39
CLI OS X/macOS: Shutdown, Restart and Sleep Commands
# Classic BSD Style
#---------------------------------------------------------------
# Shutdown hardcore style
sudo shutdown -h now
# Shutdown at once hardcore style
sudo shutdown -r now
# Shutdown hardcore style in 30 minutes
@christopheranderton
christopheranderton / brew-cask-alias-upgrade-browsers.sh
Last active February 13, 2018 08:45
Bash Profile aliases to force upgrade web browsers installed via Homebrew cask.
# Info: This only works on browsers installed with brew cask.
# For use in your .bash_profile .functions, .alias or whatever you want.
# Wrap it up in a function instead. Looks nicer.
# Brew don't recongnize in-app updates. So, either use in-app (faster updates) or cask reinstall.
# Remove your browsers manually (your preferences still there), and install them again with:
# brew cask install google-chrome google-chrome-canary opera opera-beta opera-developer opera-neon vivaldi webkit-nightly firefox firefoxdeveloperedition
alias upgradebrowsers="echo '$(tput bold)==> Upgrading Browsers with Force... $(tput sgr0)'; brew cask reinstall google-chrome caskroom/versions/google-chrome-canary opera opera-beta opera-developer opera-neon vivaldi webkit-nightly firefox firefoxdeveloperedition; brew cask cleanup; echo '$(tput bold)==> Flushing cfprefsd twice to be sure... $(tput sgr0)'; killall cfprefsd; killall cfprefsd; echo '$(tput bold)==> All Browsers has been upgraded... $(tput sgr0)'"
alias upgradeopera="echo
This file has been truncated, but you can view the full file.
22:59:09 🆕 0x14100 /Users/picard/Library/Preferences/com.tristan.FSMonitor.plist.7ZKvz9b
22:59:10 🛠 0x10400 /private/var/db/uuidtext/D0/AFA1DFF9A03096BBC6039FB407A3B8
22:59:10 🆕 0x2a500 /Applications/Wondershare Filmora.app
22:59:11 ↗️ 0x15900 /Library/Caches/com.apple.iconservices.store/DD70283E-F2E6-64BE-2B72-CF8C46B036A9.isdata.tmp
22:59:11 ↘️ 0x10800 /Library/Caches/com.apple.iconservices.store/DD70283E-F2E6-64BE-2B72-CF8C46B036A9.isdata
22:59:11 🆕 0x2a500 /Applications/Wondershare Filmora.app
22:59:11 🆕 0x20100 /Applications/Wondershare Filmora.app/Contents
22:59:11 🆕 0x1f100 /Applications/Wondershare Filmora.app/Contents/_CodeSignature/CodeResources
22:59:11 🆕 0x2e100 /Applications/Wondershare Filmora.app/Contents/_CodeSignature
22:59:11 🆕 0x20100 /Applications/Wondershare Filmora.app/Contents/Frameworks