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
| SELECT | |
| tc.table_schema, | |
| tc.constraint_name, | |
| tc.table_name, | |
| kcu.column_name, | |
| ccu.table_schema AS foreign_table_schema, | |
| ccu.table_name AS foreign_table_name, | |
| ccu.column_name AS foreign_column_name | |
| FROM | |
| information_schema.table_constraints AS tc |
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
| @OneToMany( | |
| type => Photo, | |
| photo => photo.user, | |
| {eager: true} | |
| ) | |
| photos: Photo[]; |
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
| // @ts-expect-error | |
| const unusedVariableWeWant = "hello"; | |
| // Use list as source of union type. The "as const" is necessary. | |
| export const getUserSorts = [ | |
| 'firstName', | |
| 'lastName', | |
| 'email', | |
| 'createdOn', | |
| 'role', |
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
| # update fork | |
| git fetch upstream | |
| # update local branch from fork | |
| git pull upstream master |
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Jest Subset of Tests in File", | |
| "program": "${workspaceFolder}/node_modules/.bin/jest", | |
| "args": [ | |
| "${fileBasenameNoExtension}", | |
| "--config", |
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
| // selected is the name of the property to watch. | |
| watch: { | |
| selected: function(newValue, oldValue) { | |
| } | |
| }, |
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
| # using node-sass as an example | |
| # upgrade a package | |
| npm upgrade node-sass | |
| # check version | |
| npm list node-sass | |
| # see latest version | |
| npm show node-sass version |
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
| ls | wc -l |
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 geopandas | |
| import os | |
| shp_path = './data/example.shp' | |
| shp_file = geopandas.read_file(shp_path) | |
| name = os.path.basename(shp_path) | |
| no_extension = os.path.splitext(name)[0] | |
| shp_file.to_file(f'./data/{no_extension}.geojson', driver='GeoJSON') |
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 os | |
| base = os.path.basename('/root/dir/sub/file.ext') | |
| filename = os.path.splitext(base)[0] # file |
NewerOlder