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 | |
# Builds Polybar on Fedora-based systems | |
# Tested on Fedora 25, Fedora 26 and Korora 25, untested on others | |
# To get started: | |
# | |
# wget -O- https://gist.githubusercontent.com/nathanchere/22491daf4f917b100a35e5c284a5fec5/raw/install-polybar-ex.sh | bash | |
sudo dnf install -y cmake @development-tools gcc-c++ i3-ipc jsoncpp-devel alsa-lib-devel pulseaudio-libs-devel wireless-tools-devel libmpdclient-devel libcurl-devel cairo-devel xcb-proto xcb-util-devel xcb-util-wm-devel xcb-util-image-devel xcb-util-xrm xcb-util-xrm-devel |
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
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist | |
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist |
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
########## | |
# Tweaked Win10 Initial Setup Script | |
# Primary Author: Disassembler <[email protected]> | |
# Original Version: 1.4, 2016-01-16 | |
# Tweaked based on personal preferences for @alirobe 2016-03-23 - v1.4.1 | |
# NOTE: MAKE SURE YOU READ THIS SCRIPT CAREFULLY BEFORE RUNNING IT + ADJUST COMMENTING AS APPROPRIATE | |
# This script will reboot your machine when completed. | |
########## | |
# Ask for elevated permissions if required |
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 | |
set -e | |
minimum=2000 | |
medium=4500 | |
maximum=6200 | |
value=$minimum |
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
require 'httparty' | |
require 'hmac-sha2' | |
require 'base64' | |
require 'cgi' | |
module Amazon | |
module SES | |
OPTIONS = { | |
:access_key => '...', | |
:secret_key => '...' |
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
def time_ago(timestamp, from_timestamp = nil) | |
return if timestamp.nil? | |
from_timestamp = Time.now.to_i if from_timestamp.nil? | |
difference = from_timestamp - timestamp | |
periods = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year', 'decade'] | |
lengths = [60, 60, 24, 7, 4.35, 12, 10] | |
i = 0 |
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
Domains = { | |
/domain\.com/ => '/', | |
/forum\.domain\.com/ => '/forum/index' | |
} | |
Ramaze::Route['sub domains'] = lambda do |uri, action| | |
Domains.each do |regex, sub_uri| | |
if action['env']['HTTP_HOST'] =~ regex | |
return sub_uri | |
end |