Skip to content

Instantly share code, notes, and snippets.

View drews256's full-sized avatar
🐋
💨

Andrew Stuntz drews256

🐋
💨
View GitHub Profile
def block_run
yield
puts 'ran!'
rescue StandardError
puts 'rescued!'
end
block_run do
puts 'running block'
raise StandardError
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="weather.js" type="text/javascript"></script>
</head>
<body>
<div class='center'>
h1 {
font-family: 'Roboto', sans-serif;
}
.center {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
$(document).ready(function() {
$("#weather_button").click(function(e) {
console.log(e)
e.preventDefault();
$.ajax({
type: "POST",
data: 'json',
url: 'https://api.openweathermap.org/data/2.5/weather?zip=98229,us&appid=539756b83366c299af98e440614ce980',
success: function(result) {
console.log(result)
#!/bin/bash
function simple()
{
echo 'git rebase is great'
mkdir gitexample
cd gitexample
git init
mkdir lib
touch lib/my_thing.rb