Skip to content

Instantly share code, notes, and snippets.

View instafluff's full-sized avatar
🍦
Send Ice Cream Please!

Instafluff instafluff

🍦
Send Ice Cream Please!
View GitHub Profile
@instafluff
instafluff / typescript_start.sh
Last active December 26, 2022 22:03
TypeScript Starter Steps
# Initalize the folder with NPM
npm init -y
# Install TypeScript
npm i -D typescript
# Initialize tsconfig.json
npx tsc --init
# Install and initialize Google TypeScript Style (GTS)
npm i -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-config-comfycase
# Add a .eslintrc.json file like the following with updated env section
{
@instafluff
instafluff / CodeValentines.txt
Last active March 26, 2021 18:15
The most romantic programming valentines!
You're the hello to my world
Without you, my functions are void
You're a pointer to my heart
In my life, you're an infinite loop
My functions have no arguments with you
You are the sugar to my syntax
For you, I'll loop forever
You're like the bugs in my code. You'll always be there
This switch has no break
You are someone I couldn't pass by reference
@instafluff
instafluff / Useful.js
Last active April 27, 2022 08:43
Useful JavaScript Utility Code Snippets
// Useful JavaScript Snippets!
// --- Random Number between [0,10) ---
var num = Math.floor( 10 * Math.random() );
function getRandomInt( num ) { return Math.floor( num * Math.random() ); }
// --- Removing an element from an array ---
var fruits = [ "apple", "orange", "banana", "pear", "kiwi", "melon", "blueberry" ];
var removed = fruits.splice( 2, 3 );
// -> removed === [ "banana", "pear", "kiwi" ]
red chair,blue chair,yellow chair,pink chair,purple chair,green chair,rainbow chair,brown chair
@instafluff
instafluff / TheJobinator.md
Last active June 3, 2020 17:28
The Jobinator is a Microsoft Azure Function App that detects new job positions to notify the Comfy Corner for people to know about and apply!

The Jobinator

Here are the steps we took to create The Jobinator new job openings detection service using a serverless Microsoft Azure Function App with a Discord Webhook to notify everyone and be the first to know about new positions to apply to on Instafluff's Coding Cafe on Twitch

If you're interested, you can learn about Microsoft Azure and their cool services I use to build projects like this at https://aka.ms/instafluff-social

Thank you to Microsoft Azure for sponsoring this stream on November 22, 2019!

Steps

@instafluff
instafluff / EventEmitter.js
Created April 3, 2019 03:53
EventEmitter example with a Class
const EventEmitter = require('events');
class MyClass extends EventEmitter {
constructor() {
super();
}
connect() {
setTimeout(() => this.emit('connected', 'Hello world!'), 1000);
}
}