Skip to content

Instantly share code, notes, and snippets.

kind: Service
apiVersion: v1
metadata:
name: web-app
spec:
selector:
app: web-app
ports:
- protocol: TCP
port: 80
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-app
labels:
app: deployment-label
spec:
replicas: 3
selector:
matchLabels:
@timothyclifford
timothyclifford / udacity-data-analyst-notes.md
Last active February 4, 2024 23:35
Udacity Data Analyst Nanodegree notes

Pandas

Import Pandas

import pandas as pd

Read CSV into dataframe

df = pd.read_csv('filename.csv')

Keybase proof

I hereby claim:

  • I am timothyclifford on github.
  • I am timothyclifford (https://keybase.io/timothyclifford) on keybase.
  • I have a public key ASBHobv3JxKUfqyEpk2gIIUY7e42FlimwgQP5NQi-hTQWQo

To claim this, I am signing this object:

EC2
ubuntu@ip-10-9-0-159:~$ sudo tcpdump -nn port 9000
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
09:30:36.710756 IP xxx.xxx.xxx.xxx.33988 > 10.9.0.159.9000: Flags [S], seq 1218808160, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 664858778 ecr 0,sackOK,eol], length 0
09:30:36.710866 IP 10.9.0.159.9000 > xxx.xxx.xxx.xxx.33988: Flags [S.], seq 3812133477, ack 1218808161, win 28960, options [mss 1460,sackOK,TS val 1814882 ecr 664858778,nop,wscale 7], length 0
09:30:36.842457 IP xxx.xxx.xxx.xxx.33988 > 10.9.0.159.9000: Flags [.], ack 1, win 4117, options [nop,nop,TS val 664858909 ecr 1814882], length 0
09:30:36.843524 IP xxx.xxx.xxx.xxx.33988 > 10.9.0.159.9000: Flags [P.], seq 1:84, ack 1, win 4117, options [nop,nop,TS val 664858909 ecr 1814882], length 83
09:30:36.843586 IP 10.9.0.159.9000 > xxx.xxx.xxx.xxx.33988: Flags [.], ack 84, win 227, options [nop,nop,TS val 1814915 ecr 664858909], length
{
"Version": "...",
"Id": "...",
"Statement": [
{
"Sid": "...",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::BUCKETNAME/*"
@timothyclifford
timothyclifford / System Handover Template
Created March 20, 2014 00:30
System Handover Template
System overview
Staff, roles & responsibilities
Environments
Applications
Software Licenses
Version control
Process Flows
Documentation
Support & Maintenance
Issue Submission & Resolution
@timothyclifford
timothyclifford / gist:7424695
Last active December 28, 2015 01:59
Inconsistent spacing
// Bad
<%=GlassHtml.RenderImage(Model, x=>x.Header_Image,new ImageParameters{ Width= 853, Height =305,BackgroundColor="ffffff"},true)%>
// Good
<%= GlassHtml.RenderImage(Model, x => x.Header_Image, new ImageParameters { Width = 853, Height = 305, BackgroundColor = "ffffff" }, true) %>
@timothyclifford
timothyclifford / gist:4115349
Created November 20, 2012 01:23
Disable NuGet Package Restore
<RestorePackages>true</RestorePackages>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />