Skip to content

Instantly share code, notes, and snippets.

echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@hagb4rd
hagb4rd / babel-ecma2015-cdn.html
Last active June 4, 2016 15:28
HTML-Templates
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<meta name="author" content="kasia99@gmx.de">
@robotlolita
robotlolita / purr.md
Last active May 10, 2017 20:39
Why Purr is awful

You appear to be advocating a new:

  • functional
  • imperative
  • object-oriented
  • procedural
  • stack-based
  • "multi-paradigm"
  • lazy
  • eager
  • statically-typed
@hagb4rd
hagb4rd / requirejs.bat
Last active September 30, 2017 16:41
CMD.exe ComSpec Windows .BAT & .COM script samples
REM A Set of requirejs related repositories
git clone https://github.com/hagb4rd/ea-webkit.git
git clone https://github.com/cssinjs/jss-global.git
git clone https://github.com/millermedeiros/requirejs-plugins.git
git clone https://github.com/jfparadis/requirejs-mustache.git
git clone https://github.com/millermedeiros/requirejs-plugins.git
git clone https://github.com/guybedford/require-css
git clone https://github.com/requirejs/text.git
git clone https://github.com/requirejs/i18n.git

###Javascript Patterns ..thx @ Sorella

####Composition

function compose() {
  var traits = [].slice.call(arguments)
  return traits.reduce(function(result, trait) {
    for (var k in trait) 
@kentbrew
kentbrew / abandon_all_hope.md
Last active April 22, 2018 06:17
Signing a Self-Hosted Auto-Updating Firefox Extension under the New Regime

Signing a Self-Hosted Auto-Updating Firefox Extension under the New Regime

I run a self-hosted auto-updating Firefox add-on being used by several million people. I am informed that I will need to "sign" it soon or it will quit working. (Deadlines are unclear; it seems like it may be as soon as June 30th.) I am looking for exact instructions as to how to make this happen.

I am not finding these instructions, so I am doing my best to puzzle things out.

Googling for things like "how to sign a firefox add-on" get me a lot of false leads. Mozilla should take down or at least modify these pages with current information:

https://developer.mozilla.org/en-US/docs/Signing_a_XPI

https://developer.mozilla.org/en-US/docs/Signing_an_extension

@hagb4rd
hagb4rd / hexchat.whitelist.py
Last active April 9, 2019 23:17
A hexchat addon providing a way to whitelist users (/add nick). anyone else will be muted in channels added to (/safe) is muted.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
//
// This file is part of ColorZilla
//
// Written by Alex Sirota (alex @ iosart.com)
//
// Copyright (c) iosart labs llc 2011, All Rights Reserved
//
var cz = exports;

simple-module-pattern.md

(11:00:56)<earendel>n>var module=(function() { var arr=[1,2,3,4,5]; var sum=(a,b)=>a+b;  return { items: arr, sum: sum }; })();  module.items.reduce(module.sum); //simple module pattern. just return an object which contains all things that shall be public/accessible to the user/programmer -> exports/interface .. that way you can have all your shit in a single object not polluting the global scope @thevishy
- 13 min, 53 sec
(11:14:49)<earendel>yw. but you wouldn't want it. that module pattern is understood?
(11:19:34)<earendel>oh..maybe i should add: in the browser the global object is window (not in the browser extension context, or service workers tho) .. in node however each file is a module and has it own root scope .. but its really just a function span around it.. x=1 would still be planted onto the global scope when not x is not declared in some inner scope. just do sth like cx={} 
@hagb4rd
hagb4rd / README.md
Last active October 1, 2020 17:52
JSLAVE - irc bot m0ther concept