1
2
3
4
<div class="vcard company">
  <h3 class="org fn"><%=h company.name %></h3>
  <% if company.business_address %>
...

Ruby Company hCard

by kagedwolf, July 03, 2008 06:22, 1 refactoring, tagged with partials hcard

Looking for a better way to...

3b583d1c5e2d57db5ad32ee82b56adf4 Talk
1
2
3
4
function toHTML(code) {
	code = removeTags(code)
	code = convertTables(code)
...

JavaScript Markdown-like editor

by Zodoz, July 03, 2008 01:36, 1 refactoring, tagged with javascript, markdown, editor

Hey all, I've created a Mar...

2bf2366ae73ca0d6974cad4575a16472 Talk
1
2
3
4
alphanumerics = [*('0'..'9')] + [*('A'..'Z')] + [*('a'..'z')]
(0...25).map { alphanumerics[Kernel.rand(alphanumerics.size)] }.join

...

Ruby Generating a string of rand...

by scudco, July 02, 2008 18:23, 2 refactorings, tagged with random character, random

So this is kind of trivial ...

7bdb696ac0f589522c9ed31a1b24057b Talk
1
2
3
Declare @Name varchar(128)
Declare @Cursor Cursor
...

C# Cache SQL Server Views

by GateKiller, July 02, 2008 15:07, 3 refactorings, tagged with sql query unoptimized

Question: Is there anyway t...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
namespace DataSetTableAdapters {

    partial class MyTableAdapter {
...

C# TableAdapter and CommandTim...

by Auron, July 02, 2008 10:19, 6 refactorings, tagged with tableadapter, commandtimeout, dataset, ado, C#, .net

As TableAdapters are are au...

C2953d47b6de83f3217b48c3584fab1c Talk
1
2
3
4
# -*- coding: utf-8 -*-
'''
Description: Blowfish with custom base64 obfuscation. 
...

Python Custom blowfish IRC impleme...

by ielectric.myopenid.com, July 01, 2008 15:27, No refactoring, tagged with blowfish, base64, irc
Avatar Talk
1
2
3
def use_in_file_templates!
  require 'stringio'
...

Ruby Template Method

by calebf, July 01, 2008 00:18, 3 refactorings

This method was taken from ...

357da3f3ee71d2fb88495f239e8b5b22 Talk
1
2
3
4
public static List<T> MergeListCollections<T>(List<T> firstList, List<T> secondList)
{
    List<T> mergedList = new List<T>();
...

C# Merge generic lists

by nkirkes.myopenid.com, June 30, 2008 18:42, 5 refactorings, tagged with C#, List<T>, generics

Toying with some utility me...

9661a8802c6d6f7e876c6fc7bae6721b Talk
1
2
3
4
class ENumber
  
  attr_accessor :n, :e
...

Ruby Tracking error in numbers

by Burke, June 29, 2008 17:05, 2 refactorings

We needed to do a bunch of ...

4480aadc689195bde87cf2978e835f0d Talk
1
2
3
4
$.fn.textNodes: function() {
  var ret = [];
  this.each( function() {
...

JavaScript [jQuery] All descendent tex...

by jed, June 29, 2008 07:35, 2 refactorings, tagged with jquery, dom, speed, recursive

This function returns a jQu...

7b72d5a18ab92129692e97a76a153fe0 Talk
1
2
3
4
<?php

/**
...

PHP Interfacing Tor with cURL

by Ishkur, June 28, 2008 20:29, 2 refactorings, tagged with Tor, OOP Class, php

I found a php function that...

6dc0e9a07bcff97ac9b111f36e12f1f6 Talk
1
2
3
4
public abstract class I18NException extends Exception {

   public enum Message implements ExceptionMessage {
...

Java Internationalize Exceptions

by David Linsin, June 27, 2008 20:09, No refactoring, tagged with java, exceptions, i18n

This is a template for Exce...

Ef079515af1c9963c7cd33e0b4f00e88 Talk
1
ps ax | grep "nginx: master" | xargs -I % ruby -e 'exec "sudo kill #{"%".split(/\s/).first}"'

Bash kill nginx master proces

by we4tech, June 27, 2008 16:32, 9 refactorings, tagged with kill nginx master process

hi,
i am not expert on lin...

4bb774de244da2d6e7f39a189b905077 Talk
1
2
3
4
import java.io.*;
import java.lang.Character;
// import java.util.HashMap;
...

Java Simple interpreter

by pewpew.lazer, June 23, 2008 06:16, 5 refactorings, tagged with cog, custom, script, interpreter

So I was trying to condense...

78432406bfa7a04d179d98c61e83e086 Talk
1
2
3
#!/usr/bin/guile \
-e main -s
...

Lisp CipherSaber

by Chris Jester-Young, June 22, 2008 05:39, 1 refactoring, tagged with scheme, ciphersaber, encryption

Apparently the last Scheme ...

729442eea8d8548842a6e0947e333c7b Talk
1
2
3
4
// ***** Encryption and Decryption ***** //

byte[] Key(string sText) {
...

C# Encryption and Decryption

by GateKiller, June 20, 2008 14:00, 2 refactorings, tagged with Encrypt, Decrypt, C#

This is my first attempt at...

98c852e2d9b26249745ea92c72964d3f Talk
1
2
3
4
// sanitize any potentially dangerous tags from the provided raw HTML input
public static string SanitizeHtml(string html)
{
...

C# Sanitize HTML

by Jeff Atwood, June 20, 2008 08:24, 58 refactorings, tagged with xss sanitize html

Takes a provided HTML strin...

51d623f33f8b83095db84ff35e15dbe8 Talk
1
2
3
class MyModel
  named_scope :not_hidden, :conditions => ['hidden IS NULL OR hidden = 0 OR hidden = ?', 'f']
end

Ruby ActiveRecord: named_scope f...

by mislav, June 19, 2008 18:46, 6 refactorings, tagged with named_scope boolean

Can ActiveRecord be used to...

8f93a872e399bc1353cc8d4e791d5401 Talk
1
2
3
4
def plan_prediction_chart
  @charge ||= Charge.find(params[:id]) 
    if @charge.dated?
...

Ruby Predicting future values ba...

by Matthew, June 19, 2008 14:18, 1 refactoring, tagged with ruby rails controller kiss

This could easily be the po...

4236ea6b84f4899b469e8edff4bf6d22 Talk
1
2
3
4
    carriers = Carrier.find(:all)
    @arr = []
    
...

Ruby collecting attributes from ...

by DG, June 17, 2008 10:46, 4 refactorings

In Following snippet I only...

51224bdd17878b3b19e8987e9bb336a2 Talk
1
2
3
4
  
  if logged_in?
      @email = current_user.email  
...

Ruby if else if else

by DG, June 17, 2008 10:34, 4 refactorings

In following snippet I just...

51224bdd17878b3b19e8987e9bb336a2 Talk
1
2
3
4
class Newalert 

def new_alert_validations(params)
...

Ruby model validations

by DG, June 17, 2008 05:51, 4 refactorings, tagged with model, validations

Following is the big(easy t...

51224bdd17878b3b19e8987e9bb336a2 Talk
1
2
3
4
# Ruby Quiz 2 - Scalable LCD Monitor 
# Gerard (smeevil) de Brieder - Govannon - 2008-06-12

...

Ruby Looking for comments on sty...

by smeevil, June 16, 2008 14:37, 3 refactorings, tagged with short, codereview, critics

Hi all,

I am looking for...

912b664b56818fd36821d006577ff3aa Talk
1
2
3
4
class Newalert 
    
  def alert_selection(params)
...

Ruby Simple validation

by DG, June 16, 2008 12:43, 2 refactorings, tagged with Simple validation

Hi,
Below is the small sni...

51224bdd17878b3b19e8987e9bb336a2 Talk
1
2
3
4
<?php
/*
 * This is a test of a rules based iterative algorithm...
...

PHP Rules Based Iterator

by James Stansfield, June 15, 2008 13:52, 1 refactoring, tagged with php, loop, iterate, rules, array

I had need for an iterative...

42e1363a474387e41af8f8219797e112 Talk