Skip to content

Instantly share code, notes, and snippets.

View howardpanton's full-sized avatar

Howard Panton howardpanton

View GitHub Profile
@howardpanton
howardpanton / npm-prerelease.md
Created April 8, 2020 12:42 — forked from schmich/npm-prerelease.md
Publish a prerelease package to NPM
  • Update package.json, set version to a prerelease version, e.g. 2.0.0-rc1, 3.1.5-rc4, ...
  • Run npm pack to create package
  • Run npm publish <package>.tgz --tag next to publish the package under the next tag
  • Run npm install --save package@next to install prerelease package
@howardpanton
howardpanton / Random-string
Created March 25, 2020 23:07 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
# Get the latest from GitHub, public repo:
$ npm install username/my-new-project --save-dev
# GitHub, private repo:
$ npm install git+https://token:x-oauth-basic@github.com/username/my-new-project.git#master
$ npm install git+ssh://git@github.com/username/my-new-project.git#master
# … or from Bitbucket, public repo:
$ npm install git+ssh://git@bitbucket.org/username/my-new-project.git#master --save-dev
# Bitbucket, private repo:
$ npm install git+https://username:password@bitbucket.org/username/my-new-project.git#master
@howardpanton
howardpanton / brew_symlink_error_sierra.md
Created October 20, 2018 21:45 — forked from dalegaspi/brew_symlink_error_sierra.md
Homebrew Symlink errors in Mac OSX High Sierra
@howardpanton
howardpanton / sanitizehtml.pipe.ts
Created April 17, 2018 11:10 — forked from schmidt1024/sanitizehtml.pipe.ts
angular 4 pipe for bypass security trust html
// <div [innerHTML]="your.value | sanitizeHtml" ></div>
import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@Pipe({name: 'sanitizeHtml'})
export class SanitizeHtmlPipe implements PipeTransform {
constructor(private _sanitizer:DomSanitizer) {
}
transform(v:string):SafeHtml {
@howardpanton
howardpanton / Dockerfile
Created February 8, 2018 14:04
Angular Dockerfile
# Pull the latest Node image from Docker
FROM node:latest
# Copy the current directory contents into the container at /app
COPY ./ /app/
# Set the working directory to /app
WORKDIR /app
# Install Node Modules
@howardpanton
howardpanton / hapijs-rest-api-tutorial.md
Created July 28, 2016 13:31 — forked from agendor/hapijs-rest-api-tutorial.md
A practical introduction to building a RESTful API with the hapi.js server framework for Node.js
$ brew install automake
$ rvm pkg install openssl
$ rvm requirements run
$ rvm reinstall all --force
$ gem install rails
<!doctype html>
<html>
<head>
  <title>ReSRC with a responsive slideshow from ResponsiveSlides</title>
  <style>body{margin:0;} .resrc {width: 100%} .rslides{margin:0;padding:0;list-style-type:none;position:relative;}.rslides li{width:100%;opacity:0}.rslides li:first-child{position:relative;display:block;float:left;opacity:1}.rslides img{display:block;height:auto}.rslides_nav{position:absolute;top:10%;z-index:3;margin-top:-2em;width:3.75em;height:3.75em;background-color:rgba(0,0,0,0.5);text-indent:-9999px}.rslides_nav.next{right:3.5%;outline:0}.rslides_nav.next:after{position:absolute;margin-top:-0.75em;border-width:.75em 0 .75em .75em;border-style:solid;border-color:transparent;border-left-color:#fff;content:"";top:50%;right:50%;margin-right:-0.375em}.rslides_nav.prev{left:3.5%;outline:0}.rslides_nav.prev:after{position:absolute;margin-top:-0.75em;border-width:.75em .75em .75em 0;border-style:solid;border-color:transparent;border-right-color:#fff;content:"";top:50%;left:50%;margin-left:-0.375em}</style>
</he
@howardpanton
howardpanton / Full-width overflow slider
Last active December 20, 2015 17:59
Full-width overflow slider
<div class="content-wrapper">
<div class="row slider-container overflow">
<div class="royalSlider contentSlider rsDefault block" data-slider-item-width="1280" data-slider-item-height="480">
<figure>
<img class="rsImg" src="http://artslondon.github.io/beta/assets/img/carousel-imgs/1280x480_slide_1.jpg" alt="some alt text" />
<figcaption class="rsCaption">This is an 'overflow' slider</figcaption>
</figure>
<figure>
<img class="rsImg" src="http://artslondon.github.io/beta/assets/img/carousel-imgs/1280x480_slide_2.jpg" alt="some alt text" />
<figcaption class="rsCaption">Images are still 1280 x 480</figcaption>