Skip to content

Instantly share code, notes, and snippets.

Working from home

Hemanth B hemanth22

Working from home
View GitHub Profile
hemanth22 / DisplayImage.ps1
Created Feb 20, 2021 — forked from zippy1981/DisplayImage.ps1
Display an image from Windows Powershell
View DisplayImage.ps1
# Loosely based on
$file = (get-item 'C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg')
#$file = (get-item "c:\image.jpg")
$img = [System.Drawing.Image]::Fromfile($file);
# This tip from
View crik8s.playbook
- hosts: localhost
become: true
gather_facts: true
- name: Install pip on the servers
name: python-pip
state: latest
update_cache: true
hemanth22 / Vagrantfile
Created Dec 19, 2020 — forked from z3cka/Vagrantfile
Sample base Vagrantfile with 2GB of ram and 2 cpus :-) Initialize with: vagrant init precise32
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at
# Every Vagrant virtual environment requires a box to build off of. = "precise32"
hemanth22 /
Created Dec 4, 2020 — forked from g0t4/
Starting Point Files for Jenkins2 Getting Started course
hemanth22 /
Created Dec 1, 2020 — forked from theJollySin/
Reading & Writing GZIP Files Faster in Python

Reading & Writing GZIP Files in Python

I have been testing various ways to read and write text files with GZIP in Python. There were a lot of uninteresting results, but there were two I thought were worth sharing.

Writing GZIP files

If you have a big list of strings to write to a file, you might be tempted to do:

f =, 'wb')
for line in lines:
hemanth22 / .gitconfig
Created Oct 19, 2020 — forked from rab/.gitconfig
A good starting point for ~/.gitconfig
View .gitconfig
# -*- Conf -*-
branch = auto
diff = auto
status = auto
showbranch = auto
ui = true
# color.branch
# A boolean to enable/disable color in the output of git-branch(1). May be set to always, false (or
hemanth22 /
Created Oct 11, 2020
subdirectory jenkins pipeline

node { stage("Verification"){ dir("${env.WORKSPACE}"){ sh "pwd" } } }

provider "aws" {
region = "${var.region}"
profile = "${var.profile}"
output "url-jenkins" {
value = "http://${aws_instance.jenkins-ci.0.public_ip}:8080"
output "url-gitLab" {
value = "http://${aws_instance.gitLab.0.public_ip}"
variable "profile" {
default = "terraform_iam_user"
variable "region" {
default = "ap-southeast-1"
variable "instance" {
default = "t2.nano"