- Create a k8s cluster https://cloud.digitalocean.com/kubernetes/clusters
- Install kubectl https://kubernetes.io/docs/tasks/tools/install-kubectl/
- Download config file from cluster page to
~/.kube/config
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 randomColors = [ | |
| '#8dd3c7', | |
| '#ffffb3', | |
| '#bebada', | |
| '#fb8072', | |
| '#80b1d3', | |
| '#fdb462', | |
| '#b3de69', | |
| '#fccde5', | |
| '#d9d9d9', |
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 relname, | |
| seq_scan, | |
| seq_tup_read, | |
| idx_scan | |
| FROM pg_stat_user_tables | |
| WHERE seq_scan > 0 | |
| ORDER BY 3 DESC LIMIT 10; |
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
| $ node --experimental-worker index.js | |
| Sorting [ 9, 4, 1, 6, 4, 9, 9, 10, 4, 3 ] | |
| sleeping 9000 | |
| sleeping 4000 | |
| sleeping 1000 | |
| sleeping 4000 | |
| sleeping 6000 | |
| sleeping 9000 | |
| sleeping 9000 |
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 ReactMapboxGl, { Source, Layer } from 'react-mapbox-gl'; | |
| const Map = ReactMapboxGl({ | |
| accessToken: 'pk...' | |
| }); | |
| const SOURCE_OPTIONS = { | |
| type: 'vector', | |
| tiles: ['https://...'] | |
| }; |
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
| https://oauth.vk.com/authorize?client_id=6604724&display=mobile&redirect_uri=https://oauth.vk.com/blank.html&scope=friends,photos,offline,messages&response_type=token&v=5.95 |
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: '3.7' | |
| services: | |
| nginx: | |
| image: nginx:alpine | |
| restart: always | |
| ports: | |
| - 8080:80 | |
| volumes: | |
| - ./joomla:/var/www/html |
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
| // https://doc.rust-lang.org/rust-by-example/error/iter_result.html#fail-the-entire-operation-with-collect | |
| use std::num::ParseFloatError; | |
| fn get_waypoints(path: String) -> Result<Vec<Vec<f64>>, ParseFloatError> { | |
| path | |
| .split(';') | |
| .map(|waypoint| waypoint.split(',').map(|c| c.parse::<f64>()).collect()) | |
| .collect() | |
| } |
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
| apt-get update | |
| apt-get install python3 | |
| update-alternatives --install /usr/bin/python python /usr/bin/python3 10 |