Skip to content

Instantly share code, notes, and snippets.

View surajnarwade's full-sized avatar

Suraj Narwade surajnarwade

View GitHub Profile
@surajnarwade
surajnarwade / nmcli-wifi.md
Last active February 10, 2023 08:48
Control wifi using nmcli

WI-FI using nmcli

  • Check wifi status
nmcli radio wifi
  • Turn on the wifi

type tmux in terminal

Windows:

  • Create new window: Ctrl+b c
  • Move to next window: Ctrl+b n
  • Move to previos window: Ctrl+b p
  • List all wondows: Ctrl+b w

Panes/Split:

&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
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"
@surajnarwade
surajnarwade / ListOfTalks.md
Last active July 9, 2018 16:08
List of My talks at meetups/conferences
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)
$ 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'
@surajnarwade
surajnarwade / myserver.go
Created August 8, 2017 11:04
Simple static file server in go
package main
import (
"net/http"
"os"
)
func main() {
dir, _ := os.Getwd()
http.ListenAndServe(":3000", http.FileServer(http.Dir(dir)))
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'
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()