Skip to content

Instantly share code, notes, and snippets.

View howardpanton's full-sized avatar

Howard Panton howardpanton

View GitHub Profile

Adding HipChat support to applications

Simple instruction that show you how to add HipChat support for your app so that it will post to a room of your choice, preferably one for the application in question. Both require an API token which you can get from Niklas. v2 of the HipChat API lets you use your own tokens, but I couldn't get that working intially.

Travis

You can optionally use secure tokens in your travis.yml file. It requires you to install the travis command line tool:

$ gem install travis

<head>
<!--[Font include]
/**
* @license
* MyFonts Webfont Build ID 2886433, 2014-09-19T11:53:00-0400
*
* The fonts listed in this notice are subject to the End User License
* Agreement(s) entered into by the website owner. All other parties are
* explicitly restricted from using the Licensed Webfonts(s).
*
<?php
//Q1. PHP - Complete remove_nonAtoZ() below
function remove_nonAtoZ($input) {
// example data: $input = "BA'3Ndf$%^A&*(nN)A";
// $output = "BANANA";
// Create RegExpr to remove non capital letters
$pattern = "/[A-Z]+/";
// Filter using Preg Match
preg_match_all($pattern, $input, $match);
//
// Matslab Question 5 Bonus
// Howard PAnton
//
(function() {
// Add new input option
$(".add_button").click(function(){
var value = $(".option_name").val();
@howardpanton
howardpanton / Fix Cygwin Issue with RubyGem
Created October 8, 2015 13:19 — forked from devcfgc/Fix Cygwin Issue with RubyGem
No such file or directory — /cygdrive/c/Ruby/bin/gem (LoadError)
//We must add the following to your .bashrc (C:\cygwin\home\user\.bashrc):
alias ruby='/cygdrive/c/Ruby21-x64/bin/ruby'
alias gem='/cygdrive/c/Ruby21-x64/bin/gem.bat'
alias irb='/cygdrive/c/Ruby21-x64/bin/irb.bat'
alias compass='/cygdrive/c/Ruby21-x64/bin/compass.bat'
alias sass='/cygdrive/c/Ruby21-x64/bin/sass.bat'
alias scss='/cygdrive/c/Ruby21-x64/bin/scss.bat'
@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
@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 / sanitizehtml.pipe.ts
Created April 17, 2018 11:10 — forked from cod3cow/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 / 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
# 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