Skip to content

Instantly share code, notes, and snippets.

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

pry0cc pry0cc

💭
Hacking the Planet
View GitHub Profile
@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 / 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 / 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
#!/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
#!/bin/sh
echo "{\"version\":1}"
echo "[[]"
conky -c ~/.i3/conkyrc
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
@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