-
DevOpsDays India 2017 - https://youtu.be/nZX9x_EBmvE
-
FOSSASIA, Singapore 2018 - https://youtu.be/xvRo0zJqsyU
-
CentOS DOJO, Singapore 2018 - https://youtu.be/g3DkmKIZQAg
-
Kubernauts online meetup - https://youtu.be/o5-cSaBDLIQ
-
Kubernetes Bangalore Meetup - https://youtu.be/8yzPt5MfY8s
This file contains 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 | |
HTPASSWD_FILE="./htpass" | |
USERNAME="suraj1" | |
USERPASS="developer" | |
HTPASSWD_SECRET="htpasswd-secret1" | |
htpasswd -cb $HTPASSWD_FILE $USERNAME $USERPASS | |
oc get secret $HTPASSWD_SECRET -n openshift-config &> /dev/null |
This file contains 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: v1 | |
kind: Pod | |
metadata: | |
labels: | |
run: nginx | |
name: nginx | |
spec: | |
containers: | |
- image: nginx | |
name: nginx |
This file contains 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
&a means address of a | |
b *int means b is storing address which points to intger value | |
*b means value at the address stored in b |
This file contains 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
diff --git a/cmd/push.go b/cmd/push.go | |
index 636dc8c..07b031d 100644 | |
--- a/cmd/push.go | |
+++ b/cmd/push.go | |
@@ -4,6 +4,7 @@ import ( | |
"fmt" | |
"net/url" | |
"os" | |
+ "path/filepath" | |
This file contains 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 tweepy | |
import os | |
import ConfigParser | |
import sys | |
debug = True | |
# Create myconfig.ini file as per https://github.com/surajnarwade/pycon-india-scripts/blob/master/retweeting_script/config.ini | |
config_file = "myconfig.ini" | |
config_path = os.path.join(os.path.expanduser('~'), config_file) |
This file contains 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
$ minishift start --show-libmachine-logs -v5 | |
-- Checking if requested hypervisor 'kvm' is supported on this platform ... OK | |
-- Checking if KVM driver is installed ... | |
Driver is available at /usr/local/bin/docker-machine-driver-kvm ... | |
Checking driver binary is executable ... OK | |
-- Checking if Libvirt is installed ... OK | |
-- Checking if Libvirt default network is present ... OK | |
-- Checking if Libvirt default network is active ... OK | |
-- Checking the ISO URL ... OK | |
-- Starting profile 'minishift-1.9.0' |
This file contains 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
package main | |
import ( | |
"net/http" | |
"os" | |
) | |
func main() { | |
dir, _ := os.Getwd() | |
http.ListenAndServe(":3000", http.FileServer(http.Dir(dir))) |
This file contains 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 smtplib | |
fromaddr = 'fromuser@gmail.com' | |
toaddrs = 'touser@gmail.com' | |
msg = 'There was a terrible error that occured and I wanted you to know!' | |
# Credentials (if needed) | |
username = 'fromuser' | |
password = 'password' |
This file contains 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
from selenium import webdriver | |
browser = webdriver.Firefox() | |
type(browser) | |
browser.get('http://facebook.com') | |
emailElem = browser.find_element_by_id('email') | |
emailElem.send_keys('surajnarwade353@gmail.com') | |
passwordElem = browser.find_element_by_id('pass') | |
passwordElem.send_keys('<password>') | |
passwordElem.submit() |