Skip to content

Instantly share code, notes, and snippets.

View pry0cc's full-sized avatar
💭
Hacking the Planet

pry0cc pry0cc

💭
Hacking the Planet
  • Amazon Web Services
  • Austin, TX
  • X @pry0cc
View GitHub Profile
@pry0cc
pry0cc / config
Last active August 29, 2015 14:01
## okubax 2014;i3 config file (v2) - Edited by Pry0c
#default, floating, tabbed
#new container floating
# TOGGLE FLOATING / TILING
#bindsym Mod4+SHIFT+t floating toggle
background no
out_to_console yes
out_to_x no
update_interval 1
total_run_times 0
short_units yes
pad_percents 3
override_utf8_locale yes
#!/bin/sh
echo "{\"version\":1}"
echo "[[]"
conky -c ~/.i3/conkyrc
#!/bin/bash
cd ~/.i3/
clear
echo "Hello! This script will install my i3 config, and my conky config."
echo "Press enter to continue, CTRL-C to exit"
read
sleep 0.2
@pry0cc
pry0cc / wip.rb
Last active August 29, 2015 14:02
class Dice
def initialize(type)
@type = type
end
def roll
case @type
when 4
return rand(4) + 1
when 6
@pry0cc
pry0cc / justindexin.rb
Last active August 29, 2015 14:02
A script to get links to all the images on Facets.la by Justin Maller. You can use it with wget to download them all if you so desire.
#!/usr/bin/ruby
require 'uri'
require 'open-uri'
image_no = 365; year = 2014; filename = 1
image_no.times{
year = 2013 if image_no < 332
source = open("http://www.facets.la/#{year}/#{image_no}/wallpaper/").read
url_index = URI.extract(source).select{ |l| l[/\.(?:jpe?g)\b/] }
image_no += -1
url_index.each { |image_url| $url = image_url }
@pry0cc
pry0cc / latestkernelchecker.rb
Created June 17, 2014 06:36
A Ruby script to check for the latest stable linux kernel
require 'rubygems'
require 'nokogiri'
require 'open-uri'
url = 'https://kernel.org'
data = Nokogiri::HTML(open(url))
version_no = data.at_css("#latest_link").text.strip
local_version = `uname -r`
@pry0cc
pry0cc / wallbaseswitch.sh
Created July 27, 2014 17:53
A handy little script I wrote to randomly change my wallpapers with feh. Does require images to contain a 2 digit number - Like the images on wallbase.cc
#!/bin/bash
cd ~/Pictures/Wallbase/
while [ 1 ]
do
feh --bg-scale $(ls | grep $[ ( $RANDOM % 100 ) + 1 ])
sleep 10
done
@pry0cc
pry0cc / wallbasegrab.sh
Created July 27, 2014 17:55
Uses wget to download image from wallbase.cc - Just append page url as a command line argument
#!/bin/bash
wget $(wget -O - $1 | grep 'jpg\|png' | grep wallpaper | sed 's/<img src="//g' | sed 's/" class="wall stage1 wide">//g')
#!/usr/bin/perl
use warnings;
use strict;
use LWP::Simple;
my $distro;
if ($ARGV[0]) {
print "Searching $ARGV[0]\n";