Skip to content

Instantly share code, notes, and snippets.

View niksy's full-sized avatar
💬

Ivan Nikolić niksy

💬
View GitHub Profile
@jonathantneal
jonathantneal / README.md
Created November 15, 2016 23:51
A demonstration of how simple it is to create a local server in Node

Simple Node Server

A demonstration of how simple it is to create a local server in Node.

This barebones example is here to help you understand how you could serve a simple static directory as a local site.

Usage

node .
@nolanlawson
nolanlawson / differences.md
Last active June 19, 2017 18:57
Differences between Progressive Web Apps and old-school offline webapps

Progressive Web App stack:

  • Service Worker
  • Web App Manifest

Old-school offline webapp stack:

  • Application Cache
  • Touch Icons (apple-touch-icon etc.)
  • apple-mobile-web-app-capable or mobile-web-app-capable
@doismellburning
doismellburning / userstories.md
Last active October 30, 2017 16:25
Conference User Stories
@paulirish
paulirish / what-forces-layout.md
Last active July 22, 2024 06:32
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@ericelliott
ericelliott / essential-javascript-links.md
Last active July 18, 2024 15:03
Essential JavaScript Links

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am

@addyosmani
addyosmani / README.md
Last active July 13, 2024 21:26 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@brianloveswords
brianloveswords / git-obliterate
Last active January 24, 2024 12:28
git-obliterate: for removing sensitive files you may have committed from the entire history of the project.
#!/bin/bash
file=$1
test -z $file && echo "file required." 1>&2 && exit 1
git filter-branch -f --index-filter "git rm -r --cached $file --ignore-unmatch" --prune-empty --tag-name-filter cat -- --all
git ignore $file
git add .gitignore
git commit -m "Add $file to .gitignore"
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active December 10, 2023 13:05
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
@mikekunze
mikekunze / .bowerrc
Created June 13, 2013 23:41
basic bowerrc file
{
"directory" : "public/components",
"json" : "component.json",
"endpoint" : "https://bower.herokuapp.com",
"searchpath" : ["https://bower.herokuapp.com"]
}