Skip to content

Instantly share code, notes, and snippets.

🙂

Alexander Schmidt Bloggerschmidt

🙂
Block or report user

Report or block Bloggerschmidt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Bloggerschmidt
Bloggerschmidt / PhpStorm Keyboard Shortcuts.md
Created Feb 12, 2019 — forked from koomai/PhpStorm Keyboard Shortcuts.md
Frequently Used PhpStorm Keyboard Shortcuts
View PhpStorm Keyboard Shortcuts.md

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

@Bloggerschmidt
Bloggerschmidt / git-merge.txt
Created Sep 6, 2017
merge branch to master in git
View git-merge.txt
// merge branch test to master
git checkout master
git pull origin master
git merge test
git push origin master
git branch -d test
@Bloggerschmidt
Bloggerschmidt / sanitizehtml.pipe.ts
Last active Apr 21, 2018
angular 4 pipe for bypass security trust html
View sanitizehtml.pipe.ts
// <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 {
@Bloggerschmidt
Bloggerschmidt / lab2hub.txt
Last active Aug 21, 2017
git move from gitlab to github
View lab2hub.txt
# first create an empty repo on GitHub
git remote add github https://yourLogin@github.com/yourLogin/yourRepoName.git
git push --mirror github
git remote rename origin gitlab
git remote rename github origin
@Bloggerschmidt
Bloggerschmidt / round.ts
Last active May 24, 2019
math round in typescript
View round.ts
// round(1234.5678, 2); // 1234.57
round(number, precision) {
var factor = Math.pow(10, precision);
var tempNumber = number * factor;
var roundedTempNumber = Math.round(tempNumber);
return roundedTempNumber / factor;
};
@Bloggerschmidt
Bloggerschmidt / paste-and-indent.js
Created May 29, 2017
sublime text - paste and indent
View paste-and-indent.js
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
// linux and windows
//{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
//{ "keys": ["ctrl+shift+v"], "command": "paste" }
@Bloggerschmidt
Bloggerschmidt / app.const.ts
Created May 3, 2017
using constants in angular 2
View app.const.ts
'use strict';
export const dist = '../path/to/dist/';
export const version: string = '0.0.1';
@Bloggerschmidt
Bloggerschmidt / tsconfig.json
Created Apr 26, 2017
tsconfig.json for angular2 with lib:dom to find localStorage
View tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "../dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
@Bloggerschmidt
Bloggerschmidt / keys.pipe.ts
Created Apr 24, 2017
angular2 pipe to call the keys of json properties
View keys.pipe.ts
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: 'keys'})
export class KeysPipe implements PipeTransform {
transform(value) : any {
let keys = [];
for (let key in value) {
keys.push({key: key, value: value[key]});
}
return keys;
@Bloggerschmidt
Bloggerschmidt / validIBAN.ts
Last active Jul 17, 2019
iban validation for angular2 / typescript
View validIBAN.ts
//this.validIBAN('DE89 3704 0044 0532 0130 00');
validIBAN(iban) {
// valid == 1
// invalid != 1
console.log(this.isValidIBANNumber(iban));
}
isValidIBANNumber(input) {
let CODE_LENGTHS = {
You can’t perform that action at this time.