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 ruby | |
# Remove all gems EXCEPT defaults :) | |
`gem list -d`.split(/\n\n^(?=\w)/).each do |data| | |
match = data.match(/(?<name>([^\s]+)) \((?<versions>.*)\)/) | |
name = match[:name] | |
versions = match[:versions].split(', ') | |
if match = data.match(/^.*\(([\d\.]*),? ?default\): .*$/) | |
next if match[1].empty? # it's the only version if this match is empty |
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
/** | |
** ______ _ _____ _ _ _ | |
** | _ \ | | / ___| | | (_) | | | |
** | | | |__ _ _ __| | __ \ `--. ___ | | __ _ _ __ _ _______ __| | | |
** | | | / _` | '__| |/ / `--. \/ _ \| |/ _` | '__| |_ / _ \/ _` | | |
** | |/ / (_| | | | < /\__/ / (_) | | (_| | | | |/ / __/ (_| | | |
** |___/ \__,_|_| |_|\_\ \____/ \___/|_|\__,_|_| |_/___\___|\__,_| | |
** | |
** Quassel Theme | |
** |
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
# Make Outlook's selected mail more visible: | |
outlook.office.com#$#div[aria-selected="true"] * { font-weight: bold !important; } | |
# Make stackoverflow less cluttered: | |
stackoverflow.com##div.s-sidebarwidget__yellow | |
stackoverflow.com###hot-network-questions | |
stackoverflow.com###feed-link | |
stackoverflow.com###newsletter-ad | |
stackoverflow.com#$#div.everyonelovesstackoverflow{ margin-bottom: 0 !important; } | |
stackoverflow.com##:xpath(//ol[li[div[text()='Teams']]]) |
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
const allowsTracking = () => { | |
const dnt = | |
window.doNotTrack || | |
navigator.doNotTrack || | |
navigator.msDoNotTrack | |
if (dnt === 1 || dnt === '1' || dnt === 'yes') { | |
return false | |
} | |
if ('msTrackingProtectionEnabled' in window.external) { | |
return !window.external.msTrackingProtectionEnabled() |
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
#!/bin/bash | |
scanfile () | |
{ | |
FILE="${1//[$'\n']}" # drop newline from argument | |
BITRATE=$(/usr/bin/mediainfo "$FILE" --Output=JSON | jq '.media.track[0].OverallBitRate') | |
BITRATE="${BITRATE//[$'\"']}" # remove " | |
if [[ $BITRATE -lt "130000" ]]; then | |
echo $BITRATE " " $FILE | |
fi |
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
#!/bin/bash | |
# Per-repo installation | |
# 1. Place this file in `.git/hooks/pre-push` | |
# 2. `chmod +x` it | |
clippy=' | |
_________________________________________ | |
/ It looks like youre trying to force \ | |
| push on master... | |
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
# Based on: | |
# https://stackoverflow.com/a/21957017 | |
# https://gist.github.com/HaiyangXu/ec88cbdce3cdbac7b8d5 | |
from http.server import SimpleHTTPRequestHandler | |
import socketserver | |
import sys | |
class Handler(SimpleHTTPRequestHandler): | |
extensions_map = { |