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.
/** | |
* 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 |
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.
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.
;============================== 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 |
other gists
🔗 TypeScript type toolbelt
🔗 React utils
other gists
🔗 TS/JS utility functions
🔗 React utils
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 |
// 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} | |
* |
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."