Skip to content

Instantly share code, notes, and snippets.

View lkostrowski's full-sized avatar
🇺🇦

Lukasz Ostrowski lkostrowski

🇺🇦
View GitHub Profile
@sgup
sgup / recommended-routine.md
Last active October 16, 2024 00:14
Recommended Routine - Reddit BodyweightFitness
@jcalz
jcalz / tuple.md
Last active March 1, 2024 03:33
TypeScript tuple inference

You can use the tuple() function in tuple.ts to infer tuple types in TypeScript and cut down on the need to repeat yourself. Without tuple(), declaring a constant of a tuple type looks like this:

const daysOfTheWeek: ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"] = 
  ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];

You can't do this:

const daysOfTheWeek = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]; 
(function() {
var body=document.getElementsByTagName('body').item(0);
var goLeft = 1;
var ih = body.innerHTML;
ih = '<img src="https://s-media-cache-ak0.pinimg.com/originals/7a/3d/8d/7a3d8d337b1e0f257ba2eb75a6bf355e.gif" class="ux-hen" style="visibility: hidden">' + ih;
body.innerHTML = ih;
var kura = document.getElementsByClassName('ux-hen').item(0);
kura.style.position='fixed';
kura.style.width='100px';
kura.style.bottom='20px';
@stevekinney
stevekinney / front-end-curriculum.md
Created August 9, 2015 00:47
Front-end Curriculum Draft

Module 1

  • Semantic markup
  • HTML standards mode and quirks mode
  • HTML fundamentals
    • Classes and IDs
  • CSS fundamentals
    • Selectors
    • Resets and normalizers
    • The box model

Git Cheat Sheet

Commands

Getting Started

git init

or

@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@paulirish
paulirish / data-markdown.user.js
Last active October 22, 2024 14:19
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.