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
$ ruby -v 1 ↵ | |
ruby 1.8.6 (2009-08-04 patchlevel 383) [i686-darwin13.0.0] | |
$ irb -v | |
irb 0.9.5(05/04/13) | |
$ irb 134 ↵ | |
irb(main):001:0> require 'yaml' | |
=> true | |
irb(main):002:0> YAML::load("--- !ruby/object:Gem::Specification\nname: multi_xml\nversion: !ruby/object:Gem::Version\n version: 0.5.1\n prerelease: \nplatform: ruby\nauthors:\n- Erik Michaels-Ober\nautorequire: \nbindir: bin\ncert_chain: []\ndate: 2012-05-10 00:00:00.000000000 Z\ndependencies:\n- !ruby/object:Gem::Dependency\n name: maruku\n requirement: !ruby/object:Gem::Requirement\n none: false\n requirements:\n - - ! '>='\n - !ruby/object:Gem::Version\n version: '0'\n type: :development\n prerelease: false\n version_requirements: !ruby/object:Gem: |
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
--- | |
layout: nil | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"> | |
<channel> | |
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" xmlns:atom="http://www.w3.org/2005/Atom"/> | |
<title>{{ site.title | xml_escape }}</title> | |
<generator>Octopress</generator> | |
<link>{{ site.url }}</link> |
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
var tidyHtml = function() { | |
var html = this.getValue(); | |
// remove empty paragraphs | |
html = html.replace(/<p>( |\s+)?<\/p>/g, ""); | |
html = html.replace(/<p><b>( |\s+)?<\/b><\/p>/g, ""); | |
// remove newlines between words | |
html = html.replace(/([^>])\n([^<])/g, "$1 $2"); |
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
/* | |
* This file is not Copyright (C) QUALCOMM Austria Research Center GmbH. | |
* It is not Copyright (C) Sony Computer Entertainment America LLC ("SCEA"). | |
* It is also not Copyright (C) of Apple Inc. (“Apple”). | |
* Lastly it is not Copyright (C) Epic Games, Inc. | |
*/ | |
#include <stdio.h> | |
int main() { |
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
require 'active_support/core_ext' | |
in_out = :out | |
out_days = 0 | |
in_days = 0 | |
transit_days = 0 | |
last = "2013-05-06".to_date |
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
# features/support/active_job.rb | |
# Specify the inline adapter so jobs run straight away | |
Rails.application.config.active_job.queue_adapter = :inline |
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
puts "Hello World!" |
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
require 'rubygems' | |
require 'patron' | |
50.times do | |
Thread.new do | |
print "+ Start\n" | |
session = Patron::Session.new | |
session.timeout = 30000 | |
session.connect_timeout = 30000 |
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
require 'rubygems' | |
require 'id3lib' | |
file=ARGV.join | |
filename=File.basename(file, '.mp3') | |
parts = filename.split('-') | |
artist = parts[1].strip | |
title = parts[2].strip |
OlderNewer