Skip to content

Instantly share code, notes, and snippets.

@willurd
willurd / web-servers.md
Last active April 26, 2024 18:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@paulirish
paulirish / bling.js
Last active April 20, 2024 17:39
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — 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

@irazasyed
irazasyed / ampps-mysql-fix.md
Last active March 30, 2024 21:05
AMPPS MySQL not working, Solution!

AMPPS MySQL not working, Solution!

  1. Open Ampps Application -> MySQL Tab -> Configuration.

  2. In [mysqld] section, add the following line: innodb_force_recovery = 1

  3. Save the file and try starting MySQL

  4. Remove that line which you just added and Save.

@churro-s
churro-s / LetsEncrypt_HTTPS_plex.MD
Last active February 25, 2024 11:52
Setup Let's Encrypt certificate for use with Plex Media Server on Ubuntu
@chantastic
chantastic / .projections.json
Last active February 13, 2024 19:42
ember-cli VIM projections
{
"app/adapters/*.js": {
"command": "adapter",
"template": [
"// export default DS.{capitalize}Adapter.extend();",
]
},
"app/components/*.js": {
"command": "component",
@remy
remy / gist:350433
Created March 31, 2010 14:58
Storage polyfill
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () {
var Storage = function (type) {
function createCookie(name, value, days) {
var date, expires;
if (days) {
date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
expires = "; expires="+date.toGMTString();
@hamstu
hamstu / parallax.js
Last active February 7, 2024 15:20
Parallax Example: JavaScript
var ParallaxManager, ParallaxPart;
ParallaxPart = (function() {
function ParallaxPart(el) {
this.el = el;
this.speed = parseFloat(this.el.getAttribute('data-parallax-speed'));
this.maxScroll = parseInt(this.el.getAttribute('data-max-scroll'));
}
ParallaxPart.prototype.update = function(scrollY) {