Skip to content

Instantly share code, notes, and snippets.

@coderfin
coderfin / reset.css
Created June 24, 2022 06:05 — forked from EllyLoel/reset.css
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.
*/
@coderfin
coderfin / howto.md
Last active January 10, 2020 00:56
ToastUI Image Editor How To - NPM/Angular/Typescript/SCSS

I was able to get ToastUI Image Editor working including styles and icons using npm. In a couple of steps here is how I did it within an Angular app using npm, typescript, scss, etc.

This was done using tui-image-editor 3.7.2 in an angular 6 project.

  1. Run
npm install --save tui-image-editor
@coderfin
coderfin / override.ahk
Created March 1, 2018 21:15
Map a Mac keyboard's right-control-key to a virtual, single-click of the left-Win-key on an AWS Windows WorkSpace
; 1) Download and install AutoHotKey
; https://autohotkey.com/download/
; 2) Save this file to your AWS WorkSpace desktop as override.ahk
; 3) Right click override.ahk on the desktop and `Compile Script`
; 4) Move the generated override.exe file and to the startup folder for all users
; You can find the startup folder by opening the Run program in windows and typing `shell:common startup`
; 5) Restart the machine or run the override.exe file
#SingleInstance force
RCtrl::
KeyWait Ctrl
@coderfin
coderfin / index.js
Last active August 1, 2017 17:13
Recursive Promise
{
const readAllRecordsAsync = ({ params }) => {
return new Promise((resolve, reject) => {
resolve(scanAsync({ params, records: [] }));
});
};
const scanAsync = ({ params, records }) => {
records.push(params.n);
@coderfin
coderfin / Browser Support.txt
Created August 1, 2016 15:32
Links to browser support
http://caniuse.com/
https://developer.mozilla.org/en-US/docs/MDN/Contribute/Structures/Compatibility_tables
http://kangax.github.io/compat-table/es6/
https://dev.windows.com/en-us/microsoft-edge/platform/status/
https://platform-status.mozilla.org/
https://www.chromestatus.com/features
@coderfin
coderfin / Fibonacci.js
Created July 29, 2016 17:43
A set of Fibonacci methods using new features of ES2015 (ES6)
{
class Fibonacci {
static *inRange(start, end) {
for(let num of Fibonacci) {
if(num >= start && num <= end) {
yield num;
} else if(num > end) {
break;
}
}
@coderfin
coderfin / loop.less
Created February 18, 2016 18:51
.less loop (recursive, array, extract, variable, escape, length, mixin)
// This is an example of how an array can be created and a recursive mixin used to generate complex css.
@platforms: "ios", "android", "windows", "amazon", "roku", "xbox", "xbox_one", "chrome";
.loopPlatforms(@i) when (@i > 0) {
@name: extract(@platforms, @i);
@id: ~"#@{name}";
a[href="@{id}"] {
background-image: url("/Content/images/apps/@{name}_off.png");
}