Skip to content

Instantly share code, notes, and snippets.

View pastparty's full-sized avatar
🦆
nak nak

C. S. pastparty

🦆
nak nak
View GitHub Profile
@pastparty
pastparty / vidyaviewa.bat
Created March 6, 2024 12:21
Basic vidyaviewa
@echo off
setlocal enabledelayedexpansion
:: Set the directory to the location of the batch file.
set "dir=%~dp0"
:: Create or overwrite the HTML file.
echo ^<html^> > "%dir%index.html"
echo ^<head^> >> "%dir%index.html"
echo ^<style^> >> "%dir%index.html"
@pastparty
pastparty / outline-only-for-keyboard-users.css
Created November 19, 2020 17:26
[CSS] Outline for keyboard users only
/* https://twitter.com/LeaVerou/status/1045768279753666562 */
:focus:not(:focus-visible) { outline: none }
@pastparty
pastparty / .zshrc
Created February 18, 2019 15:19
DID
# What did i do today?
# from https://theptrk.com/2018/07/11/did-txt-file/
export MDV_THEME=729.8953
export DID_PATH=~/.did
function did(){
export LC_ALL=C
mkdir -p ${DID_PATH}
if [ ! -f ${DID_PATH}/$(date +%Y-%V).md ]; then
echo "# Week $(date +"%V (%B %Y)") \n\n## $(date +"%A %Y-%m-%d")" > ${DID_PATH}/$(date +%Y-%V).md
@pastparty
pastparty / fav.md
Last active January 17, 2019 23:04
Yo dawg, I heard you like observable sequences

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.


(via https://gist.github.com/staltz/868e7e9bc2a7b8c1f754)

@pastparty
pastparty / axis-tags.md
Last active September 19, 2018 13:41
Registered axis tags

According to the OpenType specification v1.8 there are 5 registered axis tags.

Axis tag name
ital Italic
opsz Optical size
slnt Slant
wdth Width
wght Weight
@pastparty
pastparty / iife.md
Last active September 19, 2018 13:43
IIFEs Through the Ages

Immediately-Invoked Function Expression ES5—ES6

ES5

(function() {
    // code
})();
@pastparty
pastparty / system-font-stack-basics.css
Created July 17, 2018 09:51
Basic system font stack with small adjustments.
html {
font-family: -apple-system, BlinkMacSystemFont, 'San Francisco', Roboto, 'Segoe UI', 'Helvetica Neue', sans-serif;
text-rendering: optimizeLegibility;
text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
textarea,
button,
@pastparty
pastparty / floopflop.js
Last active June 28, 2018 09:46
floopflop.js - it's very good.
const floopflop = () => {
const style = `
font: 600 italic 64px/1.2 'Futura';
color: #fff;
background: rgb(208,33,32);
padding: 0 8px 8px 8px;
`;
console.log('%cFloopflop', style);
};
@pastparty
pastparty / array-functions.js
Last active June 18, 2018 09:48
Which Array Function When?
/**
* Return one thing for each existing thing
*/
arr.map((item, index) => {})
/**
* Return only some of the existing things
*/
arr.filter((item, index) => {})
@pastparty
pastparty / restore-firefox-session.md
Last active December 27, 2025 14:47
Restore Firefox Session