Skip to content

Instantly share code, notes, and snippets.

SELECT title, MATCH (title) AGAINST ('Born R') AS score, `songs`.* FROM songs WHERE MATCH (title) AGAINST ('Born') order by score DESC;
list = []
300.times do |n|
list << Thread.new do
begin
data = RestClient.get "http://ws.spotify.com/search/1/track?q=a?#{Time.now.to_f}"
puts data.code
rescue
retry
end
end
slt $t2, $t0, $t0
bne $t2, $zero, ELSE
j DONE
ELSE: addi $t2, $t2, 2
DONE:
if($t0 < $t0){
$t2 = 1;
} else{
router(Queued, TupleSpace) ->
receive
{in, Pattern, Ref, Pid} ->
Value = finding(Pattern, TupleSpace),
_TupleSpace = lists:filter((fun(A) -> 1 /= 3 end), TupleSpace), % Just for testing
case Value of
false ->
_Queued = [ {Pattern, Ref, Pid} | Queued];
_ ->
-module(main).
-compile(export_all).
% [{1,3}, {2,1}] => [{2,1}]
input(Xs) -> helper(Xs, []).
helper([], Xs) -> Xs;
helper([{First, Last} | L], Xs) when First > Last -> helper(L, [{First, Last} | Xs]);
helper([_| L], Xs) -> helper(L, Xs).
restart -f
force reset 1 0, 0 10
run 10
force r 000
run 10
force r 001
run 10
require "rubygems"
require "rspec"
class MyExample
def method
[1,2,3]
end
def method_missing(method, *args, &block)
send(:method)
<!DOCTYPE HTML>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-type">
<title>Drag &amp; Drop Tacos</title>
<link rel="stylesheet" href="/css/master.css" type="text/css" media="screen" title="no title">
<script type="text/javascript">
$("#drop_target").dndUploader({
<!DOCTYPE HTML>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-type">
<title>Drag &amp; Drop Tacos</title>
<link rel="stylesheet" href="/css/master.css" type="text/css" media="screen" title="no title">
</head>
<body>
<div id="drop_target">
#!/usr/bin/env ruby -w
puts $1 if `rvm-prompt` =~ /(\d{1}\.\d{1}.\d{1})/
# .bash_profile
# => export PS1="$(ruby-version-nice)"