Skip to content

Instantly share code, notes, and snippets.

View ackvf's full-sized avatar
🏡
Remote Fullstack Node.js / Frontend React.js

Qwerty (Vítězslav Ackermann Ferko) ackvf

🏡
Remote Fullstack Node.js / Frontend React.js
View GitHub Profile
@TooTallNate
TooTallNate / starwars.js
Created April 4, 2012 06:59
NodeJS script to play ACSII Star Wars (using a hidden cursor)
/**
* A little script to play the ACSII Star Wars, but with a hidden
* cursor, since over telnet the cursor remains visible
*/
var net = require('net')
var cursor = require('ansi')(process.stdout)
// connect to Star Wars server
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@Noitidart
Noitidart / about.md
Last active April 13, 2022 17:52 — forked from antichris/about.md
Adds a fully functional "Fork" button to your own Gist.

Fork your own Gist

This is a script that adds a fully functional Fork button to your own Gist.

If a Fork button is already present in the page, this bookmarklet will set focus to it instead of adding another one.

The change is temporary and the button will disappear as soon as you navigate away from that Gist (clicking the Fork button does this for you as well). Meaning you will have to run the script every new page load.

Firefox

Copy the contents from bookmarklet.js, open Scracthpad (Ctrl+F4), paste it there. Back in browser, swwitch to tab with your Gist you want to fork. Back in Scratchpad, "Run" it. Save and/or bookmark the Scratchpad file for future use.

@postcog
postcog / doskey.mac
Created April 18, 2015 20:42
my doskey macro file (aka alias) for windows (7) command line shell environment
;============================== loading on startup ===============================
;= create a cmd link with the following target :
;= %comspec% /k "(doskey /macrofile=%userprofile%\doskey.mac)"
;============================= File listing enhancements ============================
alias_old=IF ".$*." == ".." (doskey /macros) ELSE (IF /I "$1" == "SAVE" (doskey /macros $g "%USERPROFILE%\doskey.mac" & ECHO Aliases SAVED) ELSE (IF /I "$1"=="LOAD" (doskey /macrofile="%USERPROFILE%\doskey.mac" & ECHO Aliases LOADED & doskey /macros) ELSE (doskey $*)))
alias=IF ".$*." == ".." (doskey /macros) ELSE (IF /I "$1" == "SAVE" (doskey /macros $g "%USERPROFILE%\doskey.mac" & ECHO Aliases SAVED) ELSE (IF /I "$1"=="LOAD" (doskey /macrofile="%USERPROFILE%\doskey.mac" & ECHO Aliases LOADED & doskey /macros) ELSE (IF /I "$1"=="EDIT" (notepad %userprofile%\doskey.mac) ELSE (IF /I "$1"=="EDIT2" (notepad2 %userprofile%\doskey.mac) ELSE (doskey $*)))))
alias_=IF ".$*." == ".." (doskey /macros) ELSE (IF /I "$1" == "SAVE" (doskey /mac
@ackvf
ackvf / README.md
Last active October 13, 2022 22:47
Bookmarklets

How to create and use Bookmarklets?

Create new Bookmark

add new bookmark page

Edit Bookmark details

  • Name: for example "Enable 2/5/10 sec rewind | Netflix"
  • URL: paste the script
@ackvf
ackvf / README.md
Last active November 16, 2023 17:57
TS/JS utility functions

TS/JS utility functions

other gists
🔗 TypeScript type toolbelt
🔗 React utils


  • accessTrap - Object and Array Proxy to count number of property accesses to map used/unused properties. It maintains referential stability using a caching mechanism to not disrupt React.js render flow.
@ackvf
ackvf / README.md
Last active November 17, 2023 14:49
TypeScript type toolbelt
@starenka
starenka / mimibazar.txt
Created March 9, 2012 16:56
Mimibazar slovnicek z klubu Mimibazar fetisismus na Okounu
Ajdam: jedna ze základních potravin, strouhaný se hodí do všech mňamek, plátkový na potahování kozodortů
anální tuleníčko: anální koitus
Anklbenc: označení pro výrobky značky Uncle Ben's
baces: absces
Barbí: panenka značky 徐熙媛
Bayles, Baylís, Bejlís(ek), Bejlíz, Bailýs: svařené kondenzované mléko s tuzemákem
bekulinka, békajda: čepice, nejlépe pletená či háčkovaná s umělecky ztvárněným logem nějaké super cool značky, napřiklad Guess
blink na tetu: mimísek zblije osobě celá záda, nutno vždy zdokumentovat
blog, bloček: libovolná webová stránka (například Okoun, který se skládá z jediného klubu, totiž MMBF, a byl založen jen kvůli posmívání se MMB)
bombičkový: skvělý, úplně nejlepší, super
@ackvf
ackvf / ComponentWithGenerics.ts
Last active December 8, 2023 00:17
React utils
// Jan 2023
/**
* Provides better intellisense for JSX Components at call-site by allowing them to accept additional generics.
*
* In some cases it also switches `onChange` handler from `(value: string) => void` to `(event: HTMLInputEvent<..>) => void`
* to be used with `useFormState()` hook's e.g. `onInputChange` which accepts `EventStub` (`(ev: { target: { name, value }}) => void`).
*
* @example
* interface FormState {a, b}
*
@jennyknuth
jennyknuth / README.md
Last active March 19, 2024 20:16
Transform an SVG into a data URI—best practice

How to transform an SVG into a data URI

by Jenny Knuth, based on the work of Chris Coyier and Taylor Hunt

A data URI is a nice way to include a web resource without needing to make an HTTP request. Chris Coyier explains the technique nicely in Probably Don't Base64 SVG.

While a PNG might use Base64 encoding, for SVG, there is a better way.

Taylor Hunt's experiments led to this solution for optimizing SVGs in data URIs:

"So the best way of encoding SVG in a data URI is data:image/svg+xml,[actual data]. We don’t need the ;charset=utf-8 parameter (or the invalid ;utf8 parameter…), because URLs are always ASCII."