Skip to content

Instantly share code, notes, and snippets.

View elevenpassin's full-sized avatar
🏠
Working from home

Alice Kile elevenpassin

🏠
Working from home
View GitHub Profile
[
"You are a lot better than you probably think you are. —William Walter",
"Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss",
"This too, shall pass. —Anonymous",
"Keep your eyes on the stars and your feet on the ground. -Theodore Roosevelt,
"The only person you should try to be better than is the person you were yesterday. -Anonymous",
"Never be bullied into silence. Never allow yourself to be made a victim. Accept no one's definition of your life; define yourself. -Harvey Fierstein",
"Faith is the art of holding on to things your reason has once accepted, in spite of your changing moods. –C.S. Lewis",
"A man who flies from his fear may find that he has only taken a shortcut to meet it. -Sador, Children of Húrin",
"Life's too mysterious to take too serious. —Mary Engelbreit",
/*
A program that creates a string that represents an 8 x 8 grid, using newline characters to separate lines.
At each position of the grid there is either a space or a "#" character.
The characters printed should represent a chessboard.
*/
function printChessBoard(size){
let odd = false;
/*
A program that prints all the numbers from 1 to 100, with two exceptions.
For numbers divisible by 3, it prints "Fizz" instead of the number, and for numbers divisible by 5 (and not 3), it prints "Buzz" instead.
For numbers divisible by both 3 & 5, it prints "FizzBuzz".
TODO:
- Can we make this more progressive/dynamic in any ways?
*/
/*
A function that takes 2 arguments and returns their minimum.
*/
function min(type='binary', a, b){
switch (type){
case 'binary':
return (a > b) ? b : (b > a ? a : a)
/*
A pretty simple pyramid class that can be used to create a pyramid.
Methods in the class can be used to print out the pyramid in different ways.
*/
class Pyramid{
constructor(sizeOfPyramid){
this.size = sizeOfPyramid;
@elevenpassin
elevenpassin / break_time.py
Last active October 25, 2017 17:28
Opens a browser window every 30 minutes to ensure you don't sit for continuously for long hours.
import webbrowser
import time
total_breaks = 500
break_count = 0
break_time = 1
print("Script started at " + time.ctime())
webbrowser.open("https://www.youtube.com/watch?v=uiKg6JfS658")
@elevenpassin
elevenpassin / boom-images.js
Created September 27, 2021 15:34
All credit goes to @kentcdodds ! I just extracted the code from this [commit](https://github.com/kentcdodds/kentcdodds.com/commit/d7ebfcc7e3e8fb8354f0ca58da8159fccaeeb14d#) for personal use :D
import path from 'path'
import cloudinary from 'cloudinary'
import glob from 'glob'
import fs from 'fs'
import os from 'os'
const directoryCache = {}
const existingFolders = new Set()
cloudinary.config({