This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Highlights code contained within the post according to a given language. | |
def highlight_code string | |
post_text = string.gsub(/\r\n/, "\n") | |
# From Markdown.pl by John Gruber | |
regex = /(?:\n\n|\A)((?:(?:[ ]{4} | \t).*\n+)+)((?=^[ ]{0,4}\S)|\Z)/ix | |
matches = post_text.scan(regex) | |
for match in matches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hasRumbling = false | |
shatnerLoaded = false; | |
function stillRumbling() | |
{ | |
if(hasRumbling) return; | |
if(!shatnerLoaded) { | |
$(new Image()).load(function() { | |
shatnerLoaded = true; | |
stillRumbling(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'====================================================================================== | |
' Title: lastlogon.vbs | |
' | |
' Purpose: Prints out last logon of all users | |
' | |
' Usage: cscript <path> lastlogon.vbs > <outfile> | |
'====================================================================================== | |
Option Explicit | |
Const strProgramName = "lastlogon.vbs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Config | |
@@attributes = [:theme, :lang, :line_numbers, :current_themes] | |
cattr_accessor @@attributes | |
self.line_numbers = true | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
change this | |
<<<<<<< HEAD | |
case modifier | |
when 'A', 'M' | |
puts "Uploading #{file}" | |
ftp.put(file, file) | |
when 'D' | |
begin | |
puts "Deleting #{file}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadricus@solaris:~/Programming/Ruby/rails/rails3/lktysplt [blog*]$ AUTOFEATURE=true autotest | |
<internal:lib/rubygems/custom_require>:29: warning: loading in progress, circular require considered harmful - /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb | |
from /Users/hadricus/.rvm/gems/ruby-1.9.2-p0@rails3/bin/autotest:12:in `<main>' | |
from <internal:lib/rubygems/custom_require>:29:in `require' | |
from <internal:lib/rubygems/custom_require>:29:in `require' | |
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:1136:in `<top (required)>' | |
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:968:in `load_plugins' | |
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:968:in `each' | |
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:976:in `block in load_plugins' | |
from /Users/hadricus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems.rb:976:in `load' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby -wKU | |
require "rubygems" | |
require "serialport" | |
device = ARGV[0] ? ARGV[0] : nil | |
input_size = ARGV[1] ? ARGV[1] : nil | |
output_file = ARGV[2] ? ARGV[2] : nil | |
if !input_size || !output_file || !device | |
Kernel.exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
open $1 -a "/Applications/SynalyzeIt.app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hadricus@solaris:~/Development/Ruby/rails/blog (local)$ bundle install | |
Fetching source index for http://rubygems.org/ | |
Installing rake (0.9.2.2) | |
Installing RedCloth (4.2.9) with native extensions | |
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
/Users/hadricus/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb | |
checking for main() in -lc... *** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using terms from application "Colloquy" | |
on process subcode request command with args from user on conn | |
if command is "DCCALLOW" then | |
send raw command ("dccallow +" & user's name) to conn | |
tell user | |
send message ("DCC Allow request accepted") | |
end tell | |
return true | |
end if |
OlderNewer