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
import random | |
import math | |
# Ideally, this would return x such that, 0 < x < pi | |
# For use in cases where you need to calculate things like, | |
# the "sum of the square root, minus a piece of pi" | |
# (it's less amusing if I give the source, Google is your friend) | |
def a_piece_of_pi(): | |
return random.random(0,math.pi) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
# This is a code snippet I found online. Placed here for ease of access. | |
# Doubling clicking on this file pulls up the command line with the | |
# directory set to the same as the folder holding this file. | |
@ECHO OFF | |
cmd.exe /K |
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
# Safer delete all | |
git branch | grep -v "master" | xargs git branch -d | |
# Delete all | |
# Source: https://coderwall.com/p/x3jmig/remove-all-your-local-git-branches-but-keep-master | |
git branch | grep -v "master" | xargs git branch -D |
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
rake db:drop db:create db:migrate db:schema:dump db:setup |
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
<table class="table table-hover"> | |
<% @sheet.each do |row| %> | |
<tr> | |
<% row.each do |data| %> | |
<td><%= data %></td> | |
<% end %> | |
</tr> | |
<% end %> | |
</table> |
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
Rubocop: | |
#Parameters: '-D -E --auto-gen-config --auto-correct' | |
Parameters: '-D -E --auto-gen-config' | |
Breakman: | |
Parameters: '-A -q --summary' | |
Cane: | |
Parameters: '' |
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
<div id="demo"></div> | |
<button onclick="getLocation()">Click to show location</button> | |
<script> | |
var x = document.getElementById("demo"); | |
function getLocation() { | |
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition(showPosition); | |
} else { |
- AppSignal: Improve performance, debug errors and track deploys for your Ruby on Rails apps
- Honeybadger: Modern error management and performance monitoring for web applications
- Informant: Usability monitoring for Ruby on Rails.
- Raygun: Real time error reporting you can set up in under 5 minutes!
- Keen IO: Analytics for Developers
- DbInsights: Business intelligence insights and analytics from your database
- IronWorker: Highly available and scalable task queue / worker service.
- Free version seems only suitable for very small scale tasks. Better to use Que if scheduled size expected to exceed 5.
- QuotaGuard: Proxy Your API
OlderNewer