Skip to content

Instantly share code, notes, and snippets.


Tony Crowe tcrowe

Block or report user

Report or block tcrowe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tcrowe / npm-auth-token.js
Last active Feb 2, 2020
npm auth token with zsh or bash and curl or node
View npm-auth-token.js
// npm install superagent
const superagent = require("superagent");
// this is verdaccio's url ↓ but you could use like if that is allowed in their TOS
const registryUrl = "";
const username = "myusername2";
const password = "mypassword2";
const frm ={
name: username,
tcrowe / oblierate-service.zsh
Created Jan 29, 2020
Obliterate systemd service
View oblierate-service.zsh
# Obliterate systemd service
systemctl stop $1 2>/dev/null || true
systemctl stop $1.service 2>/dev/null || true
systemctl disable $1 2>/dev/null || true
tcrowe / keymap.cson
Created Oct 25, 2019
atom editor, emmet, svelte language-specific tab trigger, keymap.cson
View keymap.cson
# svelte language-specific tab trigger
# NOT source.js scope -------------------------------v
'atom-text-editor[data-grammar="source svelte"]:not(.source.js)':
'tab': 'emmet:expand-abbreviation-with-tab'
tcrowe / sapper-preload-example.svelte
Created Sep 25, 2019
Sapper preload instead of using stores for dynamic data
View sapper-preload-example.svelte
<script context="module">
Preload runs on the client AND server
export async function preload({ path, query, params, session }) {
console.log('path', path)
console.log('query', query)
console.log('params', params)
tcrowe /
Created Sep 24, 2019
Reminer about clickable SVG path

A pal discovered a trick with SVG paths. It was not clickable by default!

He found that you must customize it with CSS:

figured it out, for future reference you need to set 
the "pointer-events" property on a path to make it
clickable. There are various options available.

Found a handy little reference here... 
tcrowe /
Last active Dec 21, 2019
optimize and shut-up npm
npm config set -g send-metrics false
npm config set -g metrics-registry ""
npm config set -g ham-it-up false
npm config set -g optional false
npm config set -g loglevel error
npm config set -g init-version "0.1.0"
npm config set -g init-license "UNLICENSED"
npm config set -g init-author-url ""
npm config set -g init-author-email ""
npm config set -g init-author-name ""
nicksheffield / gulpfile.js
Last active Jan 7, 2017
gulp lesson example files
View gulpfile.js
var gulp = require('gulp') // the main guy
var rename = require('gulp-rename') // rename files in a stream
var stylus = require('gulp-stylus') // turn stylus code into css
var plumber = require('gulp-plumber') // handle errors
var sourcemap = require('gulp-sourcemaps') // write sourcemaps
var minifycss = require('gulp-minify-css') // minify css code
var autoprefix = require('gulp-autoprefixer') // prefix any css with low support
gulp.task('css', function(){

The problem

When I list my npm packages with npm ls -g (or without the -g option for a local node_modules directory) I see all installed packages and their dependencies. Like so:

$ npm ls -g
├─┬ anvil.js@0.9.0-RC3.1
│ ├── colors@0.6.0
│ ├─┬ commander@1.1.1
│ │ └── keypress@0.1.0
MoOx / less2stylus.js
Created Aug 27, 2012 — forked from lancejpollard/
Convert LESS to Stylus
View less2stylus.js
// Usage : less2stylusDir('../src/css/');
var fs = require('fs');
// this less 2 stylus conversion script make a stylus easy to read syntax
// - let the braces
// - replace the @ for var as $
// - let semicolons
function less2stylus(less)
You can’t perform that action at this time.