This file contains hidden or 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
# /etc/postfix/main.cf | |
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) | |
biff = no | |
append_dot_mydomain = no | |
readme_directory = no | |
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for |
This file contains hidden or 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/env ruby | |
ENV['RAILS_ENV'] ||= 'production' | |
require File.expand_path('../../config/boot', __FILE__) | |
require File.expand_path('../../config/environment', __FILE__) | |
class ResqueWorkerDaemon < DaemonSpawn::Base | |
def start(args) | |
@worker = Resque::Worker.new('*') # Specify which queues this worker will process | |
@worker.verbose = 1 # Logging - can also set vverbose for 'very verbose' |
This file contains hidden or 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 ShortRound | |
URL_CHARS = ('0'..'9').to_a + %w(b c d f g h j k l m n p q r s t v w x y z) + %w(B C D F G H J K L M N P Q R S T V W X Y Z - _) | |
URL_BASE = URL_CHARS.size | |
# Hang on lady, we going for a ride! | |
def self.generate(id) | |
local_count = id | |
result = '' | |
while local_count != 0 | |
rem = local_count % URL_BASE |
This file contains hidden or 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
Dear Sir or Madam, | |
A few hours ago the Bitcoin trading website Mt Gox has been hacked. Malicious individuals have been able to obtain a database containing usernames, email address and encrypted passwords. This information has been posted publicly on the internet. | |
As a Bitcoin supporter I'm now sending a message to every email address contained in the hacked database. This is to warn you that your username, email address and password have been leaked. I therefore strongly advice you to change your passwords. If you have used the same password on different websites it's highly recommended to change your password on all of your accounts! | |
For a more secure alternative to Mt Gox, the community appears to be moving to TradeHill. So this is no reason to lose faith in Bitcoin itself. It must be seen as a warning that not every website can be trusted with your data however! Their link is http://www.tradehill.com/?r=TH-R15683 (Note: You can remove the Referral Code when registering if you want!) This is certainly |
This file contains hidden or 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
# ------------------------ | |
# add the following packages to rubber.yml: | |
# ------------------------ | |
packages: [postfix, libio-socket-ssl-perl, libxml-libxml-perl, unzip] | |
# ------------------------ | |
# add to config/rubber/custom-setup.rb: | |
# ------------------------ |
This file contains hidden or 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
require 'fog' | |
username = 'testuser' | |
bucket = 'uniquebucketname1234' | |
aws_credentials = { | |
:aws_access_key_id => 'YOUR-ACCESS-KEY-ID', | |
:aws_secret_access_key => 'YOUR-SECRET-ACCESS-KEY' | |
} |
This file contains hidden or 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
package org.example.events; | |
import java.text.SimpleDateFormat; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import com.db4o.Db4oEmbedded; | |
import com.db4o.ObjectContainer; | |
import com.db4o.ObjectSet; |
This file contains hidden or 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
<script type="text/javascript"> | |
var rumbleUrl = 'http://railsrumble.com'; | |
</script> | |
<script type="text/javascript" src="http://blog.railsrumble.com/javascripts/rumble-r10-sash.js"></script> |
This file contains hidden or 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 ShortRound | |
URL_CHARS = ('0'..'9').to_a + %w(b c d f g h j k l m n p q r s t v w x y z) + %w(B C D F G H J K L M N P Q R S T V W X Y Z - _) | |
URL_BASE = URL_CHARS.size | |
# Hang on lady, we going for a ride! | |
def self.generate(id) | |
local_count = id | |
result = '' | |
while local_count != 0 | |
rem = local_count % URL_BASE |
This file contains hidden or 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
>> Project.count(:fields => [:owner, :name], :status => 'created', :unique => true) | |
=> 11011 | |
>> Project.all(:fields => [:owner, :name], :status => 'created', :unique => true).length | |
=> 2198 |