This file contains 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
#!/usr/bin/env python | |
import argparse | |
import requests | |
import logging | |
LOG = logging.getLogger("slack_leaver") | |
class JSONRest(object): | |
def __init__(self, base_url): |
This file contains 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
javascript:(function(){ | |
document.querySelector('.article__body.article__overlay') && document.querySelector('.article__body.article__overlay').classList.remove('article__overlay'); | |
document.getElementById('checkout-container') && document.getElementById('checkout-container').remove(); | |
document.querySelector('div.piano-article-overlay') && document.querySelector('div.piano-article-overlay').remove(); | |
})(); |
This file contains 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
#!/usr/bin/env bash | |
# Take a snapshot of user and system application icons before the Big Sur aesthetic is applied | |
function sync() { | |
FROM="$1" | |
TO="$2" | |
mkdir -p "$TO" |
This file contains 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
import socket | |
list( map( lambda x: x[4][0], socket.getaddrinfo('example.com.', 80, 0, socket.SOCK_STREAM) )) |
This file contains 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
function parse_str(str, array) { | |
// discuss at: http://phpjs.org/functions/parse_str/ | |
// original by: Cagri Ekin | |
// improved by: Michael White (http://getsprink.com) | |
// improved by: Jack | |
// improved by: Brett Zamir (http://brett-zamir.me) | |
// bugfixed by: Onno Marsman | |
// bugfixed by: Brett Zamir (http://brett-zamir.me) | |
// bugfixed by: stag019 | |
// bugfixed by: Brett Zamir (http://brett-zamir.me) |
This file contains 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
jQuery('#main_emo_menu').click(); | |
jQuery('button[aria-label=Custom]').click(); | |
jQuery('.p-emoji_picker__list').css('min-height', '900px'); | |
jQuery('.p-emoji_picker__list_container').parents('.ReactModal__Content.ReactModal__Content--after-open.popover').css('top', '0px'); | |
jQuery('.p-emoji_picker__list_container').css('max-height', '100%'); | |
jQuery('.p-emoji_picker__content .p-emoji_picker__input_container').hide(); | |
var emoji = []; |
This file contains 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
source ~/bash.includes/keychain-environment-variables.sh | |
function aws-vault() { | |
/usr/local/bin/aws-vault-wrapper "$@" | |
} | |
# example wrapper | |
## function cloudns-api() { | |
## ( | |
## export CLOUDNS_API_ID=$(keychain-environment-variable CLOUDNS_API_ID) |
This file contains 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 ( defined( 'WPCOM_IS_VIP_ENV' ) && true === WPCOM_IS_VIP_ENV ) { | |
wpcom_vip_load_plugin( 'disable-comments-query' ); | |
// Kill wp_count_comments lookups because they happen too frequently and are super slow. | |
if ( is_admin() ) { | |
add_filter( 'wp_count_comments', function( $counts, $post_id ) { | |
if ( $post_id ) | |
return $counts; |
This file contains 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
# From discussion at http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# Is a useful one-liner which will give you the full directory name of the script no matter where it is being | |
# called from | |
# Or, to get the dereferenced path (all directory symlinks resolved), do this: | |
DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# These will work as long as the last component of the path used to find the |
This file contains 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
brew install openssl | |
git clone --recursive git@github.com:tihmstar/futurerestore.git | |
cd futurerestore/ | |
export PKG_CONFIG_PATH=/usr/local/share/pkgconfig:/usr/local/lib/pkgconfig:$(brew --prefix openssl)/lib/pkgconfig | |
./autogen.sh | |
make | |
./futurerestore/futurerestore | |
NewerOlder