Skip to content

Instantly share code, notes, and snippets.

View johan--'s full-sized avatar

johan pretorius johan--

View GitHub Profile
@johan--
johan-- / postgres-brew.md
Created April 24, 2020 06:54 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@johan--
johan-- / plink-plonk.js
Created February 19, 2020 13:26 — forked from MarkArts/plink-plonk.js
Listen to your web pages
@johan--
johan-- / plink-plonk.js
Created February 19, 2020 13:22 — forked from tomhicks/plink-plonk.js
Listen to your web pages
@johan--
johan-- / static.routes.ts
Created December 9, 2019 14:23 — forked from roelofjan-elsinga/static.routes.ts
Angular routing module
import {NgModule} from '@angular/core';
import {HomeComponent} from './home/home.component';
import {AboutUsComponent} from './about-us/about-us.component';
import {ContactComponent} from './contact/contact.component';
import {UIRouterUpgradeModule} from "@uirouter/angular-hybrid";
export const StaticPagesRoutes = {
states: [
{
name: 'home',
@johan--
johan-- / dynamic.routes.ts
Created December 9, 2019 14:23 — forked from roelofjan-elsinga/dynamic.routes.ts
Dynamic routes for Angular
import {NgModule} from '@angular/core';
import {HomeComponent} from './home/home.component';
import {AboutUsComponent} from './about-us/about-us.component';
import {ContactComponent} from './contact/contact.component';
export class DependencyInjectionClass {
constructor(private _service: FictionalService) {}
resolve(route, state) {
//Get some fictional data with the id that's in the URL
@johan--
johan-- / console-logger.service.ts
Created October 28, 2019 06:47 — forked from niraj-rai/console-logger.service.ts
Logger Service and it's console logger implementation to handle logging strategy in dev and prod environment.
import { Injectable } from '@angular/core';
import { environment } from '../../../environments/environment';
export interface ILoggerService {
info(value: any, ...rest: any[]): void;
log(value: any, ...rest: any[]): void;
warn(value: any, ...rest: any[]): void;
error(value: any, ...rest: any[]): void;
}
@johan--
johan-- / README.md
Created June 28, 2019 12:27 — forked from jsanz/README.md
Leaflet Geocoder with CARTO.js

Just a minimal CARTO.js example with the defalut Leaflet Control Geocoder.

Simply add the JS and CSS imports

<!-- Geocoder-->
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css" />
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
@johan--
johan-- / powerlevel9k.config
Created June 7, 2019 11:03 — forked from athityakumar/powerlevel9k.config
Powerlevel9k oh-my-zsh theme configuration for screenshots used in https://github.com/athityakumar/colorls
export ZSH=$HOME/.oh-my-zsh
export DEFAULT_USER='athityakumar'
TERM=xterm-256color
ZSH_THEME="powerlevel9k/powerlevel9k"
POWERLEVEL9K_MODE='awesome-fontconfig'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
@johan--
johan-- / find_unused_helpers.rb
Created November 29, 2011 07:20 — forked from kennethkalmer/find_unused_helpers.rb
Find unused helpers in a Rails app (slow)
#!/usr/bin/env ruby
#
# Shotgun approach (read: slow and dirty hack) to help find unused helpers in a Rails application
#
puts "Loading all source files into memory :("
source = {}
Dir["app/**/**/*.*"].each do |f|
source[ f ] = File.readlines( f )