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
def block_run | |
yield | |
puts 'ran!' | |
rescue StandardError | |
puts 'rescued!' | |
end | |
block_run do | |
puts 'running block' | |
raise StandardError |
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
<!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'> |
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
h1 { | |
font-family: 'Roboto', sans-serif; | |
} | |
.center { | |
width: 100%; | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
justify-content: center; |
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
$(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) |
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
#!/bin/bash | |
function simple() | |
{ | |
echo 'git rebase is great' | |
mkdir gitexample | |
cd gitexample | |
git init | |
mkdir lib | |
touch lib/my_thing.rb |
OlderNewer