Skip to content

Instantly share code, notes, and snippets.

Avatar
😀
Working from home

Hemanth B hemanth22

😀
Working from home
View GitHub Profile
@hemanth22
hemanth22 / docker_vault_wr_101
Created May 24, 2021 — forked from tuxpower/docker_vault_wr_101
Docker - store secrets using Hashicorp Vault
View docker_vault_wr_101
$ cat vault.hcl
backend "consul" {
address = "consul:8500"
advertise_addr = "consul:8300"
scheme = "http"
}
listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = 1
}
@hemanth22
hemanth22 / base64.sql
Created May 17, 2021 — forked from foobarbaz-pl/base64.sql
[PL/SQL Base64 encode decode] #oracle
View base64.sql
declare
r raw(32767);
begin
r := utl_raw.cast_to_raw('Test');
dbms_output.put_line(r);
r := utl_encode.base64_encode(r);
dbms_output.put_line(utl_raw.cast_to_varchar2(r));
r := utl_encode.base64_decode(r);
@hemanth22
hemanth22 / lipsum
Created May 7, 2021 — forked from candu/lipsum
Command-line Lorem Ipsum generator using curl, lipsum.com, and jq
View lipsum
#!/bin/sh
AMOUNT=5
WHAT=paras
START=false
while getopts ":n:wpbls" opt; do
case $opt in
n)
AMOUNT=$OPTARG
@hemanth22
hemanth22 / google-apps-script.md
Created May 4, 2021 — forked from labnol/google-apps-script.md
How to Learn Google Apps Script
View google-apps-script.md

Learning Google Apps Script

Find the best resources for learning Google Apps Script, the glue that connects all GSuite services including Gmail, Google Drive, Calendar, Google Sheets, Forms, Maps, Analytics and more.

A good place to learn more about Google Apps Script is the official documentation available at developers.google.com. Here are other Apps Script resources that will help you get up to speed.

  1. Google Apps Script Code Samples by Amit Agarwal
  2. Google Apps Script Development - Create Google Apps Script projects locally inside VS Code - video tutorial
  3. Awesome Google Scripts by Amit Agarwal
  4. Google Developer Experts - Follow Apps Scr
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@hemanth22
hemanth22 / httpd.sh
Last active Apr 3, 2021
httpd installation
View httpd.sh
#!/bin/bash
yum install httpd -y
service httpd start
systemctl status -l httpd
echo "<h1>Served from Server2, Linux 2</h1>" > /var/www/html/index.html
@hemanth22
hemanth22 / gitrewrite.md
Last active Mar 23, 2021
git rewrite history
View gitrewrite.md
  1. First Go to below website link:

https://rtyley.github.io/bfg-repo-cleaner/

  1. Download the bfg.jar file.
  2. Place this file where repo has leaked secrets.
  3. Execute below command with filename which contain leaked secrets
java -jar bfg-1.14.0.jar .git --delete-files *terraform.tfstate.backup*
View hemanth.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hemanth22
hemanth22 / DisplayImage.ps1
Created Feb 20, 2021 — forked from zippy1981/DisplayImage.ps1
Display an image from Windows Powershell
View DisplayImage.ps1
# Loosely based on http://www.vistax64.com/powershell/202216-display-image-powershell.html
[void][reflection.assembly]::LoadWithPartialName("System.Windows.Forms")
$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 http://stackoverflow.com/questions/3358372/windows-forms-look-different-in-powershell-and-powershell-ise-why/3359274#3359274