- Delete the line with sqlite and replace it with:
gem 'pg'
// Access the currently selected element via: | |
console.log($0); | |
// See fired events with: | |
monitorEvents(window,'click'); | |
// Kick off the debugger the next time the given function is called: | |
debug(myFunction); |
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+ |
def check_array_for_sum?(array, sum) | |
!!array.combination(2).detect { |a, b| a + b == sum } | |
end | |
sum = 8 | |
array = [1, 2, 4, 9] | |
check_array_for_sum?(array, sum) # returns false | |
array = [1, 2, 4, 4] |
<style type="text/css" media="all"> | |
body { | |
margin: 0; | |
} | |
.container { | |
display: flex; | |
flex-direction: column; | |
justify-content: space-between; | |
} | |
.flex-grid { |
// Exit intent | |
var exitShown = false; | |
function addEvent(obj, evt, fn) { | |
if (obj.addEventListener) { | |
obj.addEventListener(evt, fn, false); | |
} else if (obj.attachEvent) { | |
obj.attachEvent("on" + evt, fn); | |
} | |
} |
echo "bla(foo)"|awk -F'[(|)]' '{print $2}' | |
#foo | |
echo "bla=@@foo@@"|awk -F'[@@|@@]' '{print $3}' | |
#foo | |
echo "blah(foo)"|sed -n 's/.*(\([^ ]*\))/\1/p' | |
#foo | |
echo "aaafoobbb"|sed -n 's/.*aaa\([^ ]*\)bbb/\1/p' | |
#foo |
git reflog | |
# you will see a list of every thing you've done in git, across all branches! | |
# each one has an index HEAD@{index} | |
# find the one before you broke everything | |
git reset HEAD@{index} | |
# magic time machine |
CSV.open("data.csv", "wb") do |csv| | |
csv << @data.first.keys # adds the attributes name on the first line | |
@data.each do |hash| | |
csv << hash.values | |
end | |
end |
# Duplicate every line containing `attributeA` replacing it with `attributeB` | |
:g/attributeA/ copy . | s//attributeB/g |