Skip to content

Instantly share code, notes, and snippets.

@isotope3
isotope3 / dev_signed_cert.sh
Created October 8, 2018 06:32 — forked from dobesv/dev_signed_cert.sh
Script to create (1) a local certificate authority, (2) a host certificate signed by that authority for the hostname of your choice
#!/usr/bin/env bash
#
# Usage: dev_signed_cert.sh HOSTNAME
#
# Creates a CA cert and then generates an SSL certificate signed by that CA for the
# given hostname.
#
# After running this, add the generated dev_cert_ca.cert.pem to the trusted root
# authorities in your browser / client system.
#
@isotope3
isotope3 / di_debug_ngmodule_injector.ts
Created September 10, 2018 20:30 — forked from alexzuza/di_debug_ngmodule_injector.ts
DI debug Root NgModule Injector
ng.probe(getAllAngularRootElements()[0]).injector.view.root.ngModule._providers
@isotope3
isotope3 / sublime-text-scopes.md
Created August 24, 2018 22:07 — forked from J2TEAM/sublime-text-scopes.md
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@isotope3
isotope3 / Memoize.js
Created June 8, 2018 23:30
A Memoizing function
function memoize(fn) {
const cachedArg;
const cachedResult;
return function(arg) {
if (cachedArg === arg) {
return cachedResult;
}
cachedArg = arg;
cachedResult = fn(arg);
return cachedResult;
@isotope3
isotope3 / tab-trigger.js
Created May 23, 2018 17:19 — forked from wesbos/tab-trigger.js
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@isotope3
isotope3 / Stars.js
Created August 19, 2017 23:35 — forked from adammark/Stars.js
var Stars = function (props) {
var {
idx = 0, // the index of this instance, as we only need to genenerate the <map> once!
rating = 0, // rating from 0 to 5, inclusive, in increments of 0.5
color = "#f6b85c", // the fill color
label = null // a label to describe the contents (for accessibility)
} = props;
var step = 18;
var scale = 0.13;
@isotope3
isotope3 / test.gist
Created February 14, 2014 15:19
Test
Test file
@isotope3
isotope3 / normalise.css
Created July 4, 2013 23:36
css: normalise.css
/*! normalize.css v2.1.2 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/