I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there. You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes. You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways. You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever. And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make itcompletely worthless. And there’s no clear problem with the set as a whole; it still has all the tools. Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!
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
scheduler = Rufus::Scheduler.new | |
def do_something | |
puts 'Something.' | |
end | |
scheduler.every "24h", :first_at => Time.now do | |
do_something | |
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
docker ps | grep cincstats | awk {'print $1'} | xargs docker stop || : && docker run -d -p 8080:3030 cincstats/deploy:latest |
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
var linearScale = d3.scale.linear() | |
.domain([d3.min(dataset, function (f) {return parseInt(f.total);}), d3.max(dataset, function (f) {return parseInt(f.total);})]) | |
.range([0, 100]); | |
var svgContainer = d3.select("#select").append('svg') | |
.attr("width", 1000) | |
.attr("height", 1000) | |
.style("border", "black solid 1px"); | |
var svgCircles = svgContainer.selectAll("circle") |
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
Usage Stats for Item #0. | |
Hours Used: 267.33 | |
Hourly Price: 0.022 | |
Total Cost for Month: 5.88 | |
Usage Stats for Item #1. | |
Hours Used: 267.35 | |
Hourly Price: 0.022 | |
Total Cost for Month: 5.88 |
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
[ | |
"97.85", | |
"98.27", | |
"98.48", | |
"98.58", | |
"98.52", | |
"98.52", | |
"98.47", | |
"98.50", | |
"98.50", |
delete all the docker containers!
docker ps -a | sed '1d' | awk {'print $1'} | xargs docker rm
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
RACKSPACE_CONFIG = { | |
'production' => { | |
path: '', | |
storage: :fog, | |
fog_credentials: { | |
provider: 'Rackspace', | |
rackspace_username: ENV['RACKSPACE_USERNAME'], | |
rackspace_api_key: ENV['RACKSPACE_API_KEY'], | |
persistent: false | |
}, |
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
function getProgress() { | |
$.ajax({ | |
dataType: "json", | |
url: '/progress' | |
}) | |
.done(function (data) { | |
var total = data.total; | |
var current = data.current; | |
var percentage = (current / total * 100); | |
$('.progress .progress-bar').width(percentage + '%'); |