Skip to content

Instantly share code, notes, and snippets.

View nirix's full-sized avatar
🚜
Terraforming cloud environments for large scale projects

Jack Polgar nirix

🚜
Terraforming cloud environments for large scale projects
View GitHub Profile
@nirix
nirix / install-polybar-ex.sh
Last active February 8, 2018 02:14 — forked from nathanchere/install-polybar-ex.sh
Build Polybar on Fedora-ish systems
#!/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
@nirix
nirix / gpg-agent.conf
Created January 30, 2018 01:04 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
@nirix
nirix / reclaimWindows10.ps1
Created July 12, 2016 02:15 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Forked from http://pastebin.com/gQxCUkLP
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# 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
#!/usr/bin/env bash
set -e
minimum=2000
medium=4500
maximum=6200
value=$minimum
@nirix
nirix / ses.rb
Created January 24, 2012 22:41
Hack for sending Emails using Amazon SES without having to depend on Mail.
require 'httparty'
require 'hmac-sha2'
require 'base64'
require 'cgi'
module Amazon
module SES
OPTIONS = {
:access_key => '...',
:secret_key => '...'
@nirix
nirix / gist:1471370
Created December 13, 2011 09:24
time_ago
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
@nirix
nirix / routes.rb
Created July 21, 2011 17:44
Routing subdomains in Ramaze
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