Skip to content

Instantly share code, notes, and snippets.

View athoug's full-sized avatar
🎨
Generative Art

Athoug athoug

🎨
Generative Art
View GitHub Profile
@athoug
athoug / books.json
Created April 21, 2019 15:02
A curated list of books made by [benoitvallon](https://github.com/benoitvallon/100-best-books/blob/master/books.json) put in a gist format for fetching
[
{
"author": "Chinua Achebe",
"country": "Nigeria",
"imageLink": "images/things-fall-apart.jpg",
"language": "English",
"link": "https://en.wikipedia.org/wiki/Things_Fall_Apart\n",
"pages": 209,
"title": "Things Fall Apart",
"year": 1958
@athoug
athoug / 0_reuse_code.js
Created July 20, 2017 14:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@athoug
athoug / array-diff.js
Last active January 7, 2020 23:34
The goal is to implement a difference function, which subtracts one list from another.
function array_diff(a, b) {
// This here is the wwrong approach where the length keeps decresing so
// the map function wouldn't check all the arrays element
a.map(function(element){
for(var i =0; i <b.length; i++){
if(element === b[i]){
a.splice(a.indexOf(element),1);
break;
}