Skip to content

Instantly share code, notes, and snippets.

View karooolis's full-sized avatar
🎯
Focusing

Karolis Ramanauskas karooolis

🎯
Focusing
View GitHub Profile
@hallettj
hallettj / global-variables-are-bad.js
Created February 14, 2009 21:15
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 20, 2025 23:00
A badass list of frontend development resources I collected over time.
@RunnerRick
RunnerRick / ._window-focus-blur.md
Last active November 27, 2023 11:27
Demonstrates how to handle the window's `focus` and `blur` events.

Demonstrates how to handle the window's focus and blur events.

This code does not depend on any third-party libraries like jQuery.

@Kartones
Kartones / postgres-cheatsheet.md
Last active April 21, 2025 19:51
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@azam
azam / svg2ico.sh
Last active February 24, 2025 11:46
Convert SVG to ICO using ImageMagick, with transparent background and multi-size icons
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico