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
| apiVersion: operator.tigera.io/v1 | |
| kind: Installation | |
| metadata: | |
| name: default | |
| spec: | |
| # Configures Calico networking. | |
| calicoNetwork: | |
| # Note: The ipPools section cannot be modified post-install. | |
| ipPools: | |
| - blockSize: 26 |
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
| #check if pytorch is using the GPU | |
| python -c 'import torch; print(torch.cuda.is_available())' #should print True | |
| python -c 'import torch; print(torch.rand(2,3).cuda())' | |
| watch -n 2 nvidia-smi | |
| ========================================================================= | |
| import torch | |
| dev = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu") |
short url: caseywatts.com/selfpublish
my book is out! an applied psychology / self-help book targeted at developers: Debugging Your Brain
Markdown --> PDF (as a booklet!)
Markdown --> EPUB and MOBI
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
| // /stacks/cicd-pipelines.ts | |
| // CDK app which creates a stack using a set of service definitions | |
| import 'source-map-support/register'; | |
| import { App } from '@aws-cdk/cdk'; | |
| import { ServiceCicdPipelines } from '../lib/cicd/pipelines'; | |
| import { deploymentTargetAccounts } from './config'; | |
| import services from './services'; | |
| const app = new App({ |
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
| Source: https://tc.gts3.org/cs6265/2017/l/lab04/README-tut.txt | |
| ==================================== | |
| Lec04: Writing Exploits with PwnTool | |
| ==================================== | |
| http://docs.pwntools.com/ | |
| http://docs.pwntools.com/en/stable/intro.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
| SPC | |
| SPC: find file | |
| , switch buffer | |
| . browse files | |
| : MX | |
| ; EX | |
| < switch buffer | |
| ` eval | |
| u universal arg | |
| x pop up scratch |
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
| ## AWS | |
| # from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories | |
| http://169.254.169.254/latest/user-data | |
| http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME] | |
| http://169.254.169.254/latest/meta-data/iam/security-credentials/[ROLE NAME] | |
| http://169.254.169.254/latest/meta-data/ami-id | |
| http://169.254.169.254/latest/meta-data/reservation-id | |
| http://169.254.169.254/latest/meta-data/hostname | |
| http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key |