Command: heroku pg:backups capture -a [app_name]
Command: curl -o latest.dump `heroku pg:backups public-url -a [app_name]`
| // create a bookmark and use this code as the URL, you can now toggle the css on/off | |
| // thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
| javascript: (function() { | |
| var styleEl = document.getElementById('css-layout-hack'); | |
| if (styleEl) { | |
| styleEl.remove(); | |
| return; | |
| } | |
| styleEl = document.createElement('style'); | |
| styleEl.id = 'css-layout-hack'; |
| openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 10000 -nodes |
| #!/bin/bash | |
| # Download GitKraken | |
| wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz | |
| # copy the downloaded file into /opt directory | |
| cp gitkraken-amd64.tar.gz /opt/ | |
| cd /opt |
| type FilterOperator = 'AND' | 'OR'; | |
| type FiltersBy<T> = { | |
| [K in keyof T]?: (value: T[K]) => boolean; | |
| }; | |
| /** | |
| * Factory function that creates a specialized function to filter | |
| * arrays, by validating all filters (AND operator), | |
| * or validating just one of the filters (OR operator). | |
| * @param operator Method to validate all filters: AND, OR |
| // Returns black or white foreground color depending on the background | |
| var textColor = function (backgroundColor) { | |
| var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(backgroundColor); | |
| if (!result) { | |
| return '#000000';//Happens when not given hex | |
| } | |
| var shade = (parseInt(result[1], 16) + parseInt(result[2], 16) + parseInt(result[3], 16)) / 3; | |
| return shade > 128 ? '#000000' : '#FFFFFF'; | |
| } |
| // Get element offset from top of page | |
| function getOffset(el) { | |
| el = el.getBoundingClientRect(); | |
| return { | |
| left: el.left + window.scrollX, | |
| top: el.top + window.scrollY | |
| }; | |
| }; |
| import {Injectable, EventEmitter} from 'angular2/core'; | |
| @Injectable() | |
| export class EmitterService { | |
| private static _emitters: { [ID: string]: EventEmitter<any> } = {}; | |
| static get(ID: string): EventEmitter<any> { | |
| if (!this._emitters[ID]) | |
| this._emitters[ID] = new EventEmitter(); | |
| return this._emitters[ID]; |