Skip to content

Instantly share code, notes, and snippets.

general
software
hardware
coding
apple
games
<div>Test <b>cazzo</b></div>
@masolino
masolino / diff.rb
Created February 1, 2015 16:36
Diff
#!/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")) }
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
def reported_spam!
update_attribute(:spam, true)
end
(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 "<" ">")
class Test
def test(test)
Test
end
end

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

# (c) 2012 Luca Guidi (lucaguidi.com) – Released under MIT License
#
# It prompts:
# *[master][~/Developer/epts]% rb:1.9.3-p0
#
# Meaning:
# - The asterisk is for mark uncommitted git changes
# - In the square brackets are respectively: for the current git branch
# and for the current directory
# - The percent is the prompt