Skip to content

Instantly share code, notes, and snippets.

View itsjzt's full-sized avatar

Saurabh Sharma itsjzt

View GitHub Profile
import requests, lxml.html
s = requests.session()
### Here, we're getting the login page and then grabbing hidden form
### fields. We're probably also getting several session cookies too.
login = s.get('https://github.com/login')
login_html = lxml.html.fromstring(login.text)
hidden_inputs = login_html.xpath(r'//form//input[@name="authenticity_token"]')
form = {x.attrib["name"]: x.attrib["value"] for x in hidden_inputs}
### Now that we have the hidden form fields, let's add in our
@itsjzt
itsjzt / install.ps1
Last active December 18, 2017 03:12
My install scripts 🐶💙
# needed for installing modules from internet
set-executionpolicy remotesigned -s cu
# install scoop )**(
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
# install some necessary apps
scoop install git
scoop install python
scoop install nodejs
@itsjzt
itsjzt / Microsoft.PowerShell_profile.ps1
Last active March 30, 2018 08:04
my powershell config . 😙
# profile.ps1 for configuring Powershell's defaults
# created by @itsjzt
# dont forget to update the gist.
# import post-git for showing git status in terminal
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Agnoster

bold text denoting it's something important

another bold text

# ping on google server (bash script)
ping -t www.google.com

Make it simple not simpler. -- Albert Einstein

@itsjzt
itsjzt / or-list.md
Created November 16, 2017 15:16
ordered list
  1. Hello this about me.
  2. I'm a great blogger.
  3. I write on medium.
@itsjzt
itsjzt / un-lists.md
Last active November 16, 2017 15:13
Un-ordered lists for blog.
  • first item

    some text about it.

  • Second item

some text also about it.

@itsjzt
itsjzt / links.md
Last active November 16, 2017 14:57
for blog
@itsjzt
itsjzt / headings.md
Created November 16, 2017 14:49
to be used in `Beginners guide to markdown` blog.

Main Heading

Sub Heading

may be used as topic heading

sub-topic headings

another heading
smallest heading