Skip to content

Instantly share code, notes, and snippets.

View aviwarner's full-sized avatar

Avi Warner aviwarner

View GitHub Profile
@aviwarner
aviwarner / index.html
Created October 28, 2020 20:22
Simple Calculator - vanilla
<div class="calculator">
<div class="row">
<div class="button clear-button">C</div>
<div class="output"></div>
</div>
<div class="row">
<div class="button number">7</div>
<div class="button number">8</div>
<div class="button number">9</div>
<div class="button operator">+</div>
@aviwarner
aviwarner / index.html
Last active October 28, 2020 17:20
Tic Tac Toe - vanilla
<div id="app">
<h1>Tic Tac Toe!</h1>
<h2>Current turn: <span id="current-turn"></span></h2>
<h2 id="result"></h2>
<div class="board">
<div class="row">
<div class="square no-left no-top" id="1"></div>
<div class="square no-top" id="2"></div>
<div class="square no-top no-right" id="3"></div>
</div>
@aviwarner
aviwarner / calc.js
Created August 8, 2018 19:18
Jamie's JS
test
### Keybase proof
I hereby claim:
* I am aviwarner on github.
* I am aviwawa (https://keybase.io/aviwawa) on keybase.
* I have a public key ASCUKiIQ7xhFOsVyU4FckpWYXE92Lc3yTNAguD3hdWUQhgo
To claim this, I am signing this object:
@aviwarner
aviwarner / gist:bbc78927635ff0509d555c16a3f82f30
Created March 5, 2018 20:34
Submission response for KELE
2.4.1 :003 > k.create_submission(2555, "submissions", "https://github.com/aviwarner/kele/commit/2feadad6fc03dd015cd2f6973345dd783f107e2d", "First test submission from API")
<!DOCTYPE html>
<html data-ng-app='NgBloc' itemscope itemtype='http://schema.org/Product'>
<head><link rel="stylesheet" media="screen" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,700|Open+Sans+Condensed:700" />
<script type="text/javascript">
//<![CDATA[
window.gon={};gon.footer_email_params={"channel":"footer","program_slug":"generic"};gon.utm_params=["utm_ad","utm_adgroup","utm_bonus","utm_campaign","utm_content","utm_keyword","utm_medium","utm_source"];gon.current_program_module={"id":3,"name":"WDT Backend","created_at":"2016-10-05T16:37:24.145-07:00","updated_at":"2016-10-05T16:37:24.145-07:00","position":3,"teachable":true,"weight":0.32,"program_id":12};gon.assessment_interviewers={};gon.lack_of_career_focus_reasons=[{"id":5,"description":"Other"},{"id":4,"description":"Hobbyist"},{"id":3,"description":"Entrepreneur"},{"
[3] pry(main)> nesting
Nesting status:
--
0. main (Pry top level)
[4] pry(main)> post = Post.first
Post Load (0.1ms) SELECT "posts".* FROM "posts" ORDER BY "posts"."id" ASC LIMIT ? [["LIMIT", 1]]
=> #<Post:0x007fac892b29f0
id: 1,
title: "First Post",
body: "This is the first post in our system",
@aviwarner
aviwarner / heaviestBallNotes.js
Created October 12, 2017 22:01
Ongoing notes and scripting for the Heaviest ball problem
/*
1) First: figure out how I would resolve this classic issue (complication comes with more possible balls)
For 8 balls (classic): Weigh 3 and 3, if both equal, weigh last two. If one pan is heavier, weigh 2 balls from that pan. One will be heavier or they'll be equal, in which case last one is heaviest. Works with up to 9 balls.
For 27 balls: Divide by 3, weigh 9 and 9. If one is heavier, follow 9 ball 2 weighing pattern above. If not, follow 9 ball 2 weighing on the unweighed set of 9.
For 81 balls: same as above. Divide in 3. Do 27 ball process with heaviest group of 27.
For 243: same as above, add one more step (weighing 81 and 81)
For 729: same as above, add one more step (weighing 243 and 243)
That's great EXCEPT, pattern is more complex if there's a number of balls between those ranges.
@aviwarner
aviwarner / index.html
Created October 10, 2017 15:48
JS Bin Find Odd INT // source https://jsbin.com/luqorap
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Find Odd INT">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@aviwarner
aviwarner / frontend-formations-practice-assessment.md
Last active August 19, 2017 05:28 — forked from mikebranski/frontend-formations-practice-assessment.md
Bloc practice assessment for Module 2: Frontend Formations

Instructions

  1. Fork this Gist
  2. Edit to add your answers
  3. Send to your mentor

No cheating! Be open and honest about what you know.

Practice Questions

@aviwarner
aviwarner / index.html
Created July 2, 2017 05:01
FCC Portfolio Page
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
</div>
<ul class="nav navbar-nav visible-xs">
<li>
<a href="#">
<p class="navbar-font">Portfolio</p>
</a>
</li>