This file contains hidden or 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
cargo clippy 2>&1 >/dev/null |
This file contains hidden or 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
# OK so I found this in a code base I am currently working on... | |
def parse_boolean(string) | |
string == 'true' ? true : false | |
end |
This file contains hidden or 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
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript"> | |
function selectFile() { | |
document.getElementById('file').click(); | |
} | |
</script> | |
<style type="text/css"> | |
#select-file { |
This file contains hidden or 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
namespace :deploy do | |
# Restart the server. | |
desc 'Restart application' | |
task :restart do | |
on roles(:app), in: :sequence, wait: 5 do | |
execute :touch, release_path.join('tmp/restart.txt') | |
end | |
end |
This file contains hidden or 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 can be used as a starting point to build a Scheme or other | |
# dynamic language interpreter. | |
module Lambda | |
def evaluate(expression, environment) | |
if expression.is_a? Symbol | |
environment[expression] | |
elsif expression[0] == "\\" | |
[expression, environment] | |
else |
This file contains hidden or 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 Array | |
def each(&block) | |
map &block | |
self | |
end | |
end |
This file contains hidden or 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
# | |
# = Mighty | |
# | |
# Convert Matt Might blog articles (or others by the way) to PDF format. | |
# This is useful for keeping as references and offline reading. | |
# | |
# Author:: Luc Traonmilin | |
# Date:: 2013-09-27 | |
# License:: MIT | |
# |