Skip to content

Instantly share code, notes, and snippets.

@Andrew-Max
Andrew-Max / index.html
Last active Apr 25, 2017
Math Birthday
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Math B-Day</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css" />
<link href="https://fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
@Andrew-Max
Andrew-Max / flattener.rb
Created Mar 22, 2017
Array Flattener in Ruby for Citrusbyte
View flattener.rb
require 'test/unit'
extend Test::Unit::Assertions
class Flattener
# Public interface does input validation and delegates to private method
def flatten(input)
raise ArgumentError, 'Argument is not array' unless input.is_a? Array
recurse_flatten(input)
end
@Andrew-Max
Andrew-Max / gist:305483febc3c367dbf57
Last active Jul 11, 2020
Route lifecycle hooks guide from Ember meetup lightning talk
View gist:305483febc3c367dbf57
App.LibraryRoute = App.ApplicationRoute.extend({
activate: function () {
//no longer enter
this._super();
only called once on entering a route.
},
beforeModel: function () {
// any state you want in place before the model is initialized, this is called before any model promises are resolved
// also could be used to conditionally prevent access to a route by throwing transition.abort
View jsbin.nufusa.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.3.0.js"></script>
<script src="http://builds.emberjs.com/tags/v1.6.1/ember.js"></script>
<script src="http://builds.emberjs.com/beta/ember-data.js"></script>
View jsbin.wavewebi.css
/* Put your CSS here */
html, body {
margin: 20px;
}
View gist:6800184
<div class="icon">
<span class="typcn typcn-pencil-outline"></span>
</div>
<div class="icon">
<span class="typcn typcn-trash-outline"></span>
</div>
<div class="icon">
<span class="typcn typcn-message-outline"></span>
</div>
<div class="icon ">