Skip to content

Instantly share code, notes, and snippets.

View Idered's full-sized avatar
📸
Working on chalk.ist

Kasper Mikiewicz Idered

📸
Working on chalk.ist
View GitHub Profile
@damodarnamala
damodarnamala / TailwindSwiftUI.swift
Last active August 30, 2022 17:09
SwiftUI styles like tailwind css
//
// ContentView.swift
// StylesApp
//
// Created by Damodar Namala on 30/08/22.
//
import SwiftUI
struct ContentView: View {
@johnspurlock-skymethod
johnspurlock-skymethod / r2-notes.md
Last active March 13, 2024 17:32
Unofficial R2 notes
@frabert
frabert / COPYING
Last active December 21, 2023 13:35
Favicons for HN
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@soerenmartius
soerenmartius / module.ts
Last active October 12, 2023 09:30
vuex 4 cognito module
import {
ActionContext,
ActionTree,
GetterTree,
MutationTree,
Module,
Store as VuexStore,
CommitOptions,
DispatchOptions,
} from 'vuex'
@soerenmartius
soerenmartius / _src_modules_auth_store_index.ts
Last active June 29, 2023 02:28
Vue 3 with Typescriptt and Vuex 4 Typed Modules Examples ( with real types )
import {
ActionContext,
ActionTree,
GetterTree,
MutationTree,
Module,
Store as VuexStore,
CommitOptions,
DispatchOptions,
} from 'vuex'
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@Demkeys
Demkeys / GridSnapper.cs
Last active October 24, 2018 11:33
Simple Grid Snapper script to show how the Grid component can be used to align GameObjects along the cells of a Grid.
/// <summary>
/// - Make sure you have a Grid GameObject (any GameObject with a Grid component attached to it) in the scene.
/// - Attach this script to the GameObject you wanna snap to the Grid. Then drag and drop the Grid
/// GameObject into the AttachedGrid field to create a reference to the Grid component attached to it.
/// - Enter Play Mode, and then every time you hit the Space key, this GameObject will move 1 unit
/// down along the Y axis, while remaining snapped to the Grid.
/// </summary>
using System.Collections;
using System.Collections.Generic;
/* @flow */
type Result<T> = {
result: boolean,
payload: T
}
type Conditional<T> = {
type: 'conditional',
exec(T): Result<T>
@Nt-gm79sp
Nt-gm79sp / powercfg-win10-more-settings.cmd
Last active January 7, 2024 16:15 — forked from theultramage/powercfg-win7-all-settings.bat
Show/hide hidden settings in Win10 Power Options
@echo on
REM checked for Windows 10
REM fork from https://gist.github.com/theultramage/cbdfdbb733d4a5b7d2669a6255b4b94b
REM you may want full list https://gist.github.com/raspi/203aef3694e34fefebf772c78c37ec2c
REM SET attrib=+ATTRIB_HIDE
SET attrib=-ATTRIB_HIDE
REM Hard disk burst ignore time
powercfg -attributes 0012ee47-9041-4b5d-9b77-535fba8b1442 80e3c60e-bb94-4ad8-bbe0-0d3195efc663 %attrib%
@ljharb
ljharb / array_iteration_thoughts.md
Last active April 29, 2024 17:13
Array iteration methods summarized

Array Iteration

https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff

While attempting to explain JavaScript's reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.

Intro

JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu