Skip to content

Instantly share code, notes, and snippets.

background no
use_xft yes
xftfont Droid Sans Mono:size=8
xftalpha 0.1
update_interval 1.0
total_run_times 0
own_window yes
own_window_class Conky
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
filetype on
set nocompatible
set nu
set viminfo^=!
set tabstop=2
set bs=2
set shiftwidth=2
set softtabstop=2
set nocp incsearch
set ai
@jaysonrowe
jaysonrowe / _micropost_form.html.erb
Created October 31, 2011 02:27
jQuery code for Textbox countdown
<script type="text/javascript">
<!--
$('#micropost_content').live('keyup keydown', function(e) {
var maxLen = 140;
var left = maxLen - $(this).val().length;
$('#char-count').html(left);
});
//-->
</script>
@jaysonrowe
jaysonrowe / _micropost_form.html.erb
Created October 31, 2011 02:29
Original Micropost Code (without countdown)
<%= form_for @micropost do |f| %>
<%= render 'shared/error_messages', :object => f.object %>
<div class="field">
<%= f.text_area :content %>
</div>
<div class="actions">
<%= f.submit "Submit" %>
</div>
<% end %>
@jaysonrowe
jaysonrowe / password.rb
Created November 1, 2011 01:58
Random String Generator
SPCHAR = %w['~`!@#$%^&*()_-+={[}]|\:;"<,>.?/'].shuffle[0..2]
UPCHAR = ('A'..'Z').to_a.shuffle[0..4]
CHAR = ('a'..'z').to_a.shuffle[0..4]
NUMCHAR = ('0'..'9').to_a.shuffle[0..4]
def random_string(length=15)
s = SPCHAR
c = CHAR
u = UPCHAR
n = NUMCHAR
@password = s + c + n + u
foreach(ITEmployee itemployee in IT)
{
if(Hungry)
{
GotoBreakRoomForDonuts(" :) ");
}
}
Title 'openSUSE Current OSS'
Repo 'http://download.opensuse.org/distribution/openSUSE-current/repo/oss/'
Title 'openSUSE Current non-OSS'
Repo 'http://download.opensuse.org/distribution/openSUSE-current/repo/non-oss/'
Title 'openSUSE Current updates'
Repo 'http://download.opensuse.org/update/openSUSE-current/'
sudo zypper ar \
http://download.opensuse.org/distribution/openSUSE-current/repo/oss/ \
'openSUSE Current OSS'
sudo zypper ar \
http://download.opensuse.org/distribution/openSUSE-current/repo/non-oss/ \
'openSUSE Current non-OSS'
sudo zypper ar \
http://download.opensuse.org/update/openSUSE-current/ \
zypper ar --refresh \
http://download.opensuse.org/repositories/openSUSE:/Tumbleweed/standard/ \
Tumbleweed
Use [IT]
GO
Select [DunkinDonuts]
From [BreakRoom]
Where [Hungry] = 1
and CaresAboutCalories in ('Don''t Care', 'Negliable')
GO
Print 'Happy Thanksgiving'