Access monitor: mysql -h [host] -u [username] -p (will prompt for password)
Access database: mysql -h [host] -u [username] -p [database] (will prompt for password)
Users functions
| # one or the other, NOT both | |
| [url "https://github"] | |
| insteadOf = git://github | |
| # or | |
| [url "[email protected]:"] | |
| insteadOf = git://github |
| URL="http://stackoverflow.com/" | |
| # store the whole response with the status at the and | |
| HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL) | |
| # extract the body | |
| HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g') | |
| # extract the status | |
| HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://') |
| files: | |
| "/etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf": | |
| mode: "000755" | |
| owner: root | |
| group: root | |
| content: | | |
| server { | |
| listen 80; | |
| gzip on; |
| import { Injectable } from '@angular/core'; | |
| import { HttpClient, HttpHeaders } from '@angular/common/http'; | |
| import { AuthGuardService } from './auth-guard.service'; | |
| import { AWS_APIGW_ID, AWS_REGION } from '../conf/aws.const'; | |
| export const API_ROOT = `https://${AWS_APIGW_ID}.execute-api.${AWS_REGION}.amazonaws.com/prd`; | |
| @Injectable() | |
| export class ApiService { |
| import { Injectable } from '@angular/core'; | |
| import { HttpClient, HttpHeaders } from '@angular/common/http'; | |
| import { AuthGuardService } from './auth-guard.service'; | |
| import { AWS_APIGW_ID, AWS_REGION } from '../conf/aws.const'; | |
| export const API_ROOT = `https://${AWS_APIGW_ID}.execute-api.${AWS_REGION}.amazonaws.com/prd`; | |
| @Injectable() | |
| export class ApiService { |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
| 'use strict'; | |
| /** | |
| * Add before safe hook and validation to all custom models with an userId property to prevent changing userId | |
| * properties by non-admin users. | |
| */ | |
| const USER_ID_PROPERTY = 'userId'; | |
| const INVALID_USER_ID = -1; |
| // based on https://github.com/strongloop/loopback/issues/651#issuecomment-259540469 | |
| 'use strict'; | |
| module.exports = function (Model, options) { | |
| if(Model && Model.sharedClass) { | |
| var methodsToExpose = options.expose || []; | |
| var methodsToHide = options.hide || []; |