Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am anthonyjpesce on github.
  • I am anthonyjpesce (https://keybase.io/anthonyjpesce) on keybase.
  • I have a public key ASBsp1WG-FbeTcwvRuoGIfijUjQ--8j23vCzhB5EN7vowQo

To claim this, I am signing this object:

@anthonyjpesce
anthonyjpesce / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
var data = [10, 5, 8, 15, 67];
var scale = function(value) {
return (value / 1898) * 300;
}
var sample = {
<!DOCTYPE HTML>
<html>
<head>
<title>My Test Page</title>
<!-- Bootstrap: http://getbootstrap.com/getting-started/ -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">
<!-- Underscore: http://underscorejs.org/ -->
$.ajax({
url: 'https://s3-us-west-2.amazonaws.com/stage.anthonypesce.com/ucla_enrollment.json',
dataType: "json",
success: function (data) {
console.log(data);
}
});
<!DOCTYPE HTML>
<html>
<head>
<title>My Test Page</title>
<!-- Bootstrap: http://getbootstrap.com/getting-started/ -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">
<!-- Underscore: http://underscorejs.org/ -->
import json
from urllib2 import urlopen
from BeautifulSoup import BeautifulSoup
data_url = "http://www.aim.ucla.edu/tables/enrollment_program_fall.aspx"
# Download the URL and load the contents
html = urlopen(data_url).read()
# Use BeautifulSoup to parse the HTML
soup = BeautifulSoup(html)
@anthonyjpesce
anthonyjpesce / template.html
Last active August 29, 2015 14:08
Underscore Template Sample Page
<!DOCTYPE HTML>
<html>
<head>
<title>My Test Page</title>
<!-- Bootstrap: http://getbootstrap.com/getting-started/ -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap-theme.min.css">
<!-- Underscore: http://underscorejs.org/ -->