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
(Use-Package Smartparens | |
:init | |
(progn | |
(use-package smartparens-config) | |
(use-package smartparens-ruby) | |
(use-package smartparens-html) | |
(smartparens-global-mode 1) | |
(show-smartparens-global-mode 1) | |
(sp-with-modes '(rhtml-mode) | |
(sp-local-pair "<" ">") |
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
def reported_spam! | |
update_attribute(:spam, 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
SELECT * FROM ( | |
(SELECT people.id AS person_id, people.email AS person_email, people.name AS person_name, results.title AS result_title, results.id AS result_id | |
FROM people, contents AS results, downloads | |
WHERE results.id = 166674 | |
AND downloads.content_id = results.competition_id | |
AND downloads.person_id = people.id) | |
UNION | |
(SELECT people.id AS person_id, people.email AS person_email, people.name AS person_name, results.title AS result_title, results.id AS result_id | |
FROM people, contents AS results, resource_visits | |
WHERE results.id = 166674 |
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/env ruby | |
f1 = IO.readlines("file1.txt").map(&:chomp) | |
f2 = IO.readlines("file2.txt").map(&:chomp) | |
File.open("diff.txt","w+"){ |f| f.write((f2-f1).join("\n")) } |
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
<div>Test <b>cazzo</b></div> |
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
general | |
software | |
hardware | |
coding | |
apple | |
games |
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
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
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
.floatimg { | |
float: right; | |
margin: 0 0 10px 10px; | |
border: 1px solid #666; | |
padding: 2px; | |
} | |
<p> | |
<img class="floatimg" src="images/image.gif" alt="" width="100" height="100"> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
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 Newsletter < ActiveRecord::Base | |
has_many :rows | |
title | |
... | |
end | |
class Project < ActiveRecord::Base | |
has_many :row_items | |
has_many :rows, :through => :row_items |
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/env ruby | |
unless ARGV[0] | |
puts 'Usage: newpost "the post title"' | |
exit(-1) | |
end | |
date_prefix = Time.now.strftime("%Y-%m-%d") | |
postname = ARGV[0].strip.downcase.gsub(/ /, '-') | |
post = "/Users/al3x/src/al3x.github.com/_posts/#{date_prefix}-#{postname}.textile" |
OlderNewer