Skip to content

Instantly share code, notes, and snippets.

View oswhytecodes's full-sized avatar
❤️
Graphic Design - Logo & Web Design

Orincy Whyte oswhytecodes

❤️
Graphic Design - Logo & Web Design
View GitHub Profile
@lorenzejay
lorenzejay / setup-morning.automation.applescript
Last active September 22, 2022 17:08
My script that is triggered with launchd every working morning
tell application "Shortcuts" to run shortcut "MorningAutomationDNDToggler"
tell application "Calendar" to activate
tell application "zoom.us" to launch
tell application "Spotify" to launch
if application "Spotify" is running then
tell application "Spotify"
play track "spotify:track:7eTxWRSvauWm5L3FblGk2h"
end tell
end if
tell application "Google Chrome" to activate (open location "https://hashnode.com/")
@MBlore
MBlore / TimeDiff.js
Last active September 11, 2022 01:40
JS Time difference between two dates.
/**
* Returns the amount of seconds between two given dates.
* @param {Date} dtStart The start time.
* @param {Date} dtEnd The end time.
* @returns The number of seconds between the two dates.
*/
function secondsBetween(dtStart, dtEnd) {
var diff = (dtStart.getTime() - dtEnd.getTime()) / 1000;
return Math.abs(diff);
}
@MBlore
MBlore / Proxy.html
Created September 3, 2022 00:16
Plain JS showing how the Proxy object can be used to intercept logic.
<!DOCTYPE html>
<html>
<body>
<h1 id="cnt">0</h1>
<script type="text/javascript">
const state = {
count: 0
}
@EllyLoel
EllyLoel / reset.css
Last active April 13, 2024 18:14
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/

Dev Setup

  1. Homebrew/terminal/bash
  2. OSX Productivity - Window Management/Quick Launcher/Hyperswitch
  3. OSX Settings - Dock/Finder
  4. Web Browser - Extensions - AdBlock, Privacy Badger, OneTab, JSONViewer, Stylus, Vue Devtools, React Devtools
  5. Node.js - nvm
  6. Code Editor - vs code
  7. Code Editor Extensions
  8. Break timer and Flux
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
@martensonbj
martensonbj / readme-template.md
Created February 16, 2017 19:21
Personal project README template

Project Name & Pitch

Example:

TweetWorld

An application used to filter data form Twitter based on user preference, built with React, Redux, JavaScript, and CSS.

Project Status

(only necessary if incomplete)

@jherax
jherax / filterArray.js
Last active May 6, 2024 09:35
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@arttuladhar
arttuladhar / softwareengineeringexcel.md
Created July 31, 2015 04:06
Software Engineering Competency Checklist

Software Engineering Excellency

DATA STRUCTURES
  • Doesn’t know the difference between Array and LinkedList
  • Able to explain and use Arrays, LinkedLists, Dictionaries etc in practical programming tasks
  • Knows space and time tradeoffs of the basic data structures, Arrays vs LinkedLists, Able to explain how hashtables can be implemented and can handle collisions, Priority queues and ways to implement them etc.
  • Knowledge of advanced data structures like B-trees, binomial and fibonacci heaps, AVL/Red Black trees, Splay Trees, Skip Lists, tries etc
ALGORITHMS
  • Unable to find the average of numbers in an array
@roachhd
roachhd / README.md
Last active June 22, 2024 07:12
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION