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 | |
| # Apps you want to protect (e.g. JetBrains IDEs, Xcode, etc.) | |
| guardedApps=(JetBrains Xcode) | |
| # Directories to clean | |
| guardedLocations=( | |
| "$HOME/Library/Caches" | |
| "$HOME/Library/Logs" | |
| "/Library/Caches" |
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
| getFormValidationErrors(): any { | |
| const errors = []; | |
| Object.keys(this.tenantForm.controls).forEach(key => { | |
| const controlErrors: ValidationErrors = this.tenantForm.get(key).errors; | |
| if (controlErrors != null) { | |
| Object.keys(controlErrors).forEach(keyError => { | |
| errors.push({ | |
| 'field': key, | |
| 'error': keyError, |
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
| location / { | |
| proxy_pass https://fotogena.co:8000; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "upgrade"; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; # This line. | |
| proxy_connect_timeout 1000; | |
| proxy_send_timeout 1500; | |
| proxy_read_timeout 2000; |
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
| let array1 = [{name: 'Peter'}, {name: 'Alex'}, {name: 'John'}]; | |
| let array2 = [{name: 'James'}, {name: 'Alice'}, {name: 'Peter'}] | |
| const new_array = this.array1.map((a) => { | |
| a['exists'] = this.array2.some((s) => s.name === a.name) ? true : false; | |
| return a; | |
| }); | |
| console.log(new_array); |
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
| [ | |
| { | |
| "name": "Afghanistan", | |
| "dial_code": "+93", | |
| "code": "AF" | |
| }, | |
| { | |
| "name": "Aland Islands", | |
| "dial_code": "+358", | |
| "code": "AX" |
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
| git log --all --grep="search text" |
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
| /* | |
| Tired of scrolling to one of the last photos on the page on Instagram? Let your | |
| browser do the scrolling for you! | |
| 31-05-2017 | |
| (c) 2017 - Loran Kloeze - loran@ralon.nl | |
| Usage | |
| - Go to https://www.instagram.com/instagram_handle/ (change instagram_handle in i.e. taylorswift) | |
| - Open up the console (F12) (Firefox users: type 'allow pasting' if you haven't done so yet) | |
| - Select the contents of this complete file and copy/paste it to the console and hit enter |
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
| [ | |
| "Aardvark", | |
| "Albatross", | |
| "Alligator", | |
| "Alpaca", | |
| "Ant", | |
| "Anteater", | |
| "Antelope", | |
| "Ape", | |
| "Armadillo", |
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 cors = require('cors') | |
| // Set `useWhitelist` to `false` if you want to accept all requests. | |
| const config = { | |
| useWhitelist: true | |
| } | |
| // Define from which origins requests are allowed. | |
| const whitelist = [ | |
| // 'https://fiddle.jshell.net', |
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
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |
NewerOlder