This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # production|preprod | |
| command -v jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Try 'brew install jq' Aborting."; exit 1; } | |
| command -v curl >/dev/null 2>&1 || { echo >&2 "I require curl but it's not installed. Try 'brew install curl' Aborting."; exit 1; } | |
| command -v perl >/dev/null 2>&1 || { echo >&2 "I require perl but it's not installed. Try 'brew install perl' Aborting."; exit 1; } | |
| command -v tr >/dev/null 2>&1 || { echo >&2 "I require tr but it's not installed.' Aborting."; exit 1; } | |
| case $1 in | |
| production|preprod) | |
| platform=$1 | |
| ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # https://gist.github.com/lukebussey/70fe3b245c7b55fa41300670d2698e54#gistcomment-2636296 | |
| sudo rm -R /Library/Sophos\ Anti-Virus/ | |
| sudo rm -R /Library/Application\ Support/Sophos/ | |
| sudo rm -R /Library/Preferences/com.sophos.* | |
| sudo rm /Library/LaunchDaemons/com.sophos.* | |
| sudo rm /Library/LaunchAgents/com.sophos.* | |
| sudo rm -R /Library/Extensions/Sophos* | |
| sudo rm -R /Library/Caches/com.sophos.* | |
| ~/Applications/Remove\ Sophos\ Endpoint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const arr = [ | |
| { id: 1, val: 'a' }, | |
| { id: 2, val: 'b' }, | |
| { id: 1, val: 'a' }, | |
| { id: 1, val: 'c' } | |
| ]; | |
| const uni = arr | |
| .reduce( ( unique, item ) => | |
| unique.some( existing => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // MultiString.pipe.ts | |
| import { | |
| Pipe, | |
| PipeTransform | |
| } from '@angular/core'; | |
| @Pipe({ name: 'multiString' }) | |
| export class MultiStringPipe implements PipeTransform { | |
| function transform(...values: string[]): string { | |
| return values |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| FormGroup, | |
| FormRecord, | |
| FormArray, | |
| ValidationErrors | |
| } from '@angular/forms'; | |
| export function getFormValidationErrors(form: FormGroup|FormRecord|FormArray, path ?: string = '$') { | |
| const result = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Create a bookmark in your Bookmarks Bar. Name it something like "TMP clean up" */ | |
| /* Paste this code snippet into the URL field */ | |
| javascript: (() => { | |
| [ | |
| "dashboard-profile-wrapper cil-wrapper", /* scrolling banner reminder */ | |
| "maintenancemessage", /* keep-your-profile-updated reminder */ | |
| "welcome-msg-wrapper", /* profile-last-updated + aging + rotation-eligible block */ | |
| "ls_dynamic_div", /* help button */ | |
| ].forEach((id) => { | |
| var elem = document.getElementById(id); |
OlderNewer