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 | |
| utmpdump /var/log/wtmp* | awk '$4~"root" {print}' |
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 | |
| # Scenario: the database server is running outside of Kubernetes | |
| # and it is in a private network. | |
| # The database connection string is stored into a ConfigMap named: | |
| # `MY_CONFIG_MAP` and its variable name is: `DATABASE_CONNECTION_STRING`. | |
| # We don't want to copy & paste the connection string into the | |
| # command line, we want it to be automatically pulled from the config and | |
| # piped into the command. |
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
| # This file is: ~/.ssh/config | |
| # You may have other (non-CodeCommit) SSH credentials stored in this | |
| # config file – in addition to the CodeCommit settings shown below. | |
| # NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file! | |
| # Credentials for Account1 | |
| Host awscc-account1 # 'awscc-account1' is a name you pick | |
| Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region |
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
| alias ls='ls -G' | |
| # The next line updates PATH for the Google Cloud SDK. | |
| if [ -f '/Users/enosotti/Tools/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/enosotti/Tools/google-cloud-sdk/path.zsh.inc'; fi | |
| # The next line enables shell command completion for gcloud. | |
| if [ -f '/Users/enosotti/Tools/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/enosotti/Tools/google-cloud-sdk/completion.zsh.inc'; fi | |
| # >>> conda initialize >>> | |
| # !! Contents within this block are managed by 'conda init' !! |
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
| # ------------------------------------------------------------------- | |
| # Reverse US GeoCoding in BigQuery using public datasets - cities | |
| # | |
| # WARNING: This query uses the OLD public datasets. | |
| # Find the NEW version at: | |
| # https://gist.github.com/edonosotti/10b9e642f3cc74e9dd2d026dd556486f | |
| # ------------------------------------------------------------------- | |
| # Create a temporary, in memory table | |
| WITH IconicUSLocations AS ( |
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
| # ------------------------------------------------------------------- | |
| # Reverse US GeoCoding in BigQuery using public datasets - counties | |
| # | |
| # WARNING: This query uses the OLD public datasets. | |
| # Find the NEW version at: | |
| # https://gist.github.com/edonosotti/f842c0868e663f3beb85133a75bdecca | |
| # ------------------------------------------------------------------- | |
| # Create a temporary, in memory table | |
| WITH IconicUSLocations AS ( |
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
| # ------------------------------------------------------------------- | |
| # Reverse US GeoCoding in BigQuery using public datasets - states | |
| # | |
| # WARNING: This query uses the OLD public datasets. | |
| # Find the NEW version at: | |
| # https://gist.github.com/edonosotti/f998aea189ad6f68c44e8a92387bcebf | |
| # ------------------------------------------------------------------- | |
| # Create a temporary, in memory table | |
| WITH IconicUSLocations AS ( |
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
| # ------------------------------------------------------------------- | |
| # Reverse US GeoCoding in BigQuery using public datasets - zipcodes | |
| # | |
| # WARNING: This query uses the OLD public datasets. | |
| # Find the NEW version at: | |
| # https://gist.github.com/edonosotti/faa1c9dc0ffd402bff6df50ff56cfa50 | |
| # | |
| # The NEW version also fixed the `zipcode_geom` column in the | |
| # `zipcode_area` table, incorrectly stored as a STRING type. | |
| # It does not require to be casted to GEOMETRY on-the-fly with the |
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
| # --------------------------------------------------------------- | |
| # Reverse US GeoCoding in BigQuery using public datasets - cities | |
| # --------------------------------------------------------------- | |
| # Create a temporary, in memory table | |
| WITH IconicUSLocations AS ( | |
| SELECT 1 AS id, 'Empire State Building' AS name, 40.748170 AS lat, -73.985000 AS lon UNION ALL | |
| SELECT 2, 'Golden Gate Bridge', 37.810181, -122.477318 UNION ALL | |
| SELECT 3, 'Yosemite National Park', 37.8532261, -119.6911924 UNION ALL | |
| SELECT 4, 'Grand Canyon', 36.0997623, -112.1212394 UNION ALL |
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
| # ----------------------------------------------------------------- | |
| # Reverse US GeoCoding in BigQuery using public datasets - counties | |
| # ----------------------------------------------------------------- | |
| # Create a temporary, in memory table | |
| WITH IconicUSLocations AS ( | |
| SELECT 1 AS id, 'Empire State Building' AS name, 40.748170 AS lat, -73.985000 AS lon UNION ALL | |
| SELECT 2, 'Golden Gate Bridge', 37.810181, -122.477318 UNION ALL | |
| SELECT 3, 'Yosemite National Park', 37.8532261, -119.6911924 UNION ALL | |
| SELECT 4, 'Grand Canyon', 36.0997623, -112.1212394 UNION ALL |