Skip to content

Instantly share code, notes, and snippets.

View encody's full-sized avatar
☠️
Only mostly dead

Jacob Lindahl encody

☠️
Only mostly dead
View GitHub Profile
@encody
encody / Election_basic.sol
Created April 20, 2018 23:10
Smart Contracts and Dapps Lecture Files
pragma solidity ^0.4.0;
contract Election_basic {
mapping (string => uint) votes;
function vote (string candidate) public {
votes[candidate]++;
}
function getVotes (string candidate) public view returns (uint) {
@encody
encody / Vector.js
Created August 6, 2016 02:24
Analog Clock
/*
Video Guide: https://youtu.be/1q7EEd6Huf0
*/
function Vector (magnitude, angle) {
var m, a;
this.getX = function () {
return m * Math.cos(a);
};
@encody
encody / draw.css
Created July 31, 2016 00:13
Simple Drawing Web App
/*
Video Guide: https://youtu.be/amXSWXQssww
*/
body {
margin: 0;
}
.top-bar {
display: flex;
@encody
encody / index.html
Created July 24, 2016 04:10
Toggle Switches
<!--
Video Guide: https://youtu.be/39b_FstkhSM
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Toggle Switches</title>
<link rel="stylesheet" href="toggle-switches.css">
@encody
encody / index.html
Last active July 24, 2016 04:23
Stopwatch
<!--
Video Guide: https://youtu.be/fF-vtP3sjPc
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Stopwatch</title>
<link rel="stylesheet" href="stopwatch.css">
@encody
encody / hamburger.js
Last active July 24, 2016 04:22
Transforming Hamburger Menu
/*
Video Guide: https://youtu.be/eqhEq9_uVas
*/
var menus = document.getElementsByClassName('hamburger-menu');
[].forEach.call(menus, function (m) {
m.addEventListener('click', function () {
m.classList.toggle('open');
});
@encody
encody / button.css
Created July 6, 2016 12:43
Button Ripple Effect
/*
Video Guide: https://youtu.be/QI2rDHQM5Pc
*/
body {
background-color: #333;
}
button {
font-family: "Roboto";
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Basics</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<main>
<h1>Blog</h1>