Skip to content

Instantly share code, notes, and snippets.

View jessegilbride's full-sized avatar

Jesse Gilbride jessegilbride

View GitHub Profile
@tparveen
tparveen / Big_O_practice.md
Last active July 10, 2021 00:03
Big O exercises

Exercise: What's the complexity?

Implement the following algorithms and analyze its expected (average) and worst run time complexities. You should work through the functions one by one, making comments and identifying the complexity of each part of the algorithm. If you are unsure of how the algorithms scale, then try adding counter variables and incrementing them each time an operation takes place. By logging out the counters for different sizes of input you should be able to see a trend developing.

Exercise 1:

Write a program that determines if an input is even or odd. Explain its average and worst run time

Exercise 2:

Write a program that doubles every value in an array. Explain its average and worst run time

@luruke
luruke / smashingmagazine.js
Last active January 17, 2025 09:55
Source code of the demo "Improving User Flow Through Page Transitions" on Smashing Magazine.
/*
https://www.smashingmagazine.com/2016/07/improving-user-flow-through-page-transitions/
You can copy paste this code in your console on smashingmagazine.com
in order to have cross-fade transition when change page.
*/
var cache = {};
function loadPage(url) {
if (cache[url]) {
@mbejda
mbejda / Industries.csv
Last active May 14, 2025 15:47
Compiled list of industries.
Industry
Accounting
Airlines/Aviation
Alternative Dispute Resolution
Alternative Medicine
Animation
Apparel/Fashion
Architecture/Planning
Arts/Crafts
Automotive
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@samwize
samwize / mocha-guide-to-testing.js
Created February 8, 2014 05:53
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@jaysonrowe
jaysonrowe / FizzBuzz.js
Created January 11, 2012 01:39
FizzBuzz JavaScript solution
for (var i=1; i <= 20; i++)
{
if (i % 15 == 0)
console.log("FizzBuzz");
else if (i % 3 == 0)
console.log("Fizz");
else if (i % 5 == 0)
console.log("Buzz");
else
console.log(i);