Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven Saus uriel1998

View GitHub Profile
@uriel1998
uriel1998 / volume.rb
Created Feb 10, 2012 — forked from jaspervdj/volume.rb
Set PulseAudio volume, mute, unmute, and change default sink (and automagically switch running audio streams) from the commandline
View volume.rb
#!/usr/bin/ruby
#
# Moved to: https://github.com/uriel1998/volumerb
#
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
# Unported License. To view a copy of this license, visit
# http://creativecommons.org/licenses/by-sa/3.0/.
#
# Forked/derived from original by Jasper Van der Jeugt (jaspervdj);
@uriel1998
uriel1998 / bitly.py
Last active Oct 8, 2015 — forked from mmueller/bitly.py
Command-line bit.ly URL generator (Python)
View bitly.py
#!/usr/bin/env python
#
# Copyright 2009 Empeeric LTD. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@uriel1998
uriel1998 / google--lastyearsecure.xml
Created Sep 27, 2012
Search Google for results over the last year over a SSL connection. Place this file in the /searchplugins directory in your Firefox profile.
View google--lastyearsecure.xml
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/" xmlns:os="http://a9.com/-/spec/opensearch/1.1/">
<os:ShortName>Google - SSL Last Year</os:ShortName>
<os:Description>Google - SSL Last Year</os:Description>
<os:InputEncoding>UTF-8</os:InputEncoding>
<os:Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAAAAD0hUJK9IVC5/SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQuT0hUJK9IVC5vSFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC5/SFQv/0hUL/9IVC//SFQv/1jU7/+sir//7v5//95df/+9S9//vPtf/3oW7/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/+9jC//3s4f/1lFn/9IVC//SFQv/0iEb//NvH//eibv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//3u5f/5u5b/9IVC//SFQv/0hUL/9IVC//m6lP/707r/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/5vpv//N7M//SIR//0hUL/9IVC//WSV//97OH/+8+0//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC//epev/6yKr/+byW//nCoP/+9O7//e3j//WSVv/0hUL/9IVC//SFQv/0hUL/9IVC//SFQv/0hUL/9IVC
@uriel1998
uriel1998 / ebon.sh
Created Nov 5, 2012
Script for running the Everchanging Book of Names in Wine
View ebon.sh
#!/bin/bash
cd ~/.ebon
wine EBoN.exe
@uriel1998
uriel1998 / version.bat
Created Nov 16, 2012
Create a time/date stamped version of any inputted filename; bash and windows batch file versions. Moved to https://github.com/uriel1998/versionscripts
View version.bat
@echo off
REM This is the Windows batch file version of this script for NT/XP and later.
REM
REM By Steven Saus
REM Licensed under a Creative Commons BY-SA 3.0 Unported license
REM To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/.
REM
REM Creates time/date stamped version of file for collaborative work.
REM
REM Typically run with the filename (full path not needed, but will work with) as
@uriel1998
uriel1998 / smallcoverkill.sh
Created Nov 17, 2012
Small bash script to remove small cover images (or really, any small resolution images)
View smallcoverkill.sh
#! bin/bash
cd ~/Music
echo "Run this script from your base music directory (or wherever you want to purge png and jpg images from)"
echo "Currently in $PWD"
echo "What is the minimum resolution you want?"
read request
# test for number without decimal
if [ "$request" -eq "$request" ] 2>/dev/null; then
echo "Finding jpg covers."
find . -iname "*.jpg" -exec ls -f '{}' \; > tempfile.txt
@uriel1998
uriel1998 / style.css
Created Nov 25, 2012
CSS stylesheet for ePub
View style.css
/* You may notice that my CSS file is organized in a fairly straightforward and */
/* static way. This is intentional, folks. You can do a LOT fancier - but I'm */
/* operating under a KISS principle here. Otherwise it's too easy to have more */
/* than one style applying to any line and making troubleshooting difficult. */
/* My goal is portability and it NEVER distracting from the text. */
/* Put any additional fonts you REQUIRE here. I recommend using additional fonts */
/* only when you MUST; and always define a fallback. Please note that if you have */
/* the font in a sub-directory, you must define it properly in the src portion */
@uriel1998
uriel1998 / .Xresources
Created Nov 26, 2012
Xterm commands to allow for modern cut-n-paste (and look spiffy too).
View .Xresources
! this are Xresources to make xterm look good
! put into ~/.Xresources
! after changing contents, run xrdb -merge .Xresources
! http://blog.ssokolow.com/archives/2011/05/01/modernizing-xterms-paste/
! http://www.leidinger.net/X/xresources/app-defaults/XTerm_mascheck
! http://linux.seindal.dk/2005/06/16/xterm-and-the-clipboard/
! http://blog.bigsmoke.us/2010/01/31/xterm-clipboard-selection
! http://www.davidsimmons.com/soft/xtermhacks/
@uriel1998
uriel1998 / css_kindle
Created Dec 15, 2012
A tiny bit of CSS I find that I have to put on EACH page of an eBook to make it work properly when converted to Kindle formats.
View css_kindle
<style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; margin-left: 5.0pt; margin-right: 5.0pt;}
</style>
@uriel1998
uriel1998 / gist:4357160
Created Dec 22, 2012
Examples of what goes in the "head" section of a web page....
View gist:4357160
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Steven Saus - Author, Nuclear Medicine Technologist, Sociology and Economic Wonk and Pronoaic Memebroker - Steve Saus</title>
<meta name="keywords" content="author, steven saus,steve saus,nuclear medicine,writer, sociologist, technologist,paper,academic" />
<meta name="description" content="Professional page of Steven Saus, author, publisher, freelance writer, sociologist, non-traditional student, nuclear medicine technologist, and pronoiac memebroker." />
<link href="favicon.ico" rel="SHORTCUT ICON">
</head>