Skip to content

Instantly share code, notes, and snippets.

View yashhere's full-sized avatar

Yash Agarwal yashhere

View GitHub Profile
@nikhilweee
nikhilweee / statement-to-excel.py
Last active June 11, 2024 10:23
Convert HDFC Bank Credit Card statements from PDF to Excel
# This script is designed to convert bank statements from pdf to excel.
#
# It has been tweaked on HDFC Bank Credit Card statements,
# but in theory you can use it on any PDF document.
#
# The script depends on camelot-py,
# which can be installed using pip
#
# pip install "camelot-py[cv]"
@andrebrait
andrebrait / keychron_linux.md
Last active July 14, 2024 10:31
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@runako
runako / webgoat.rb
Created December 30, 2017 05:07
Selenium Example: Exercise WebGoat
require 'selenium-webdriver'
chromedriver_path = '/path/to/chromedriver'
Selenium::WebDriver::Chrome.driver_path = chromedriver_path
driver = Selenium::WebDriver.for :chrome
driver.navigate.to 'http://localhost:7070/WebGoat'
wait = Selenium::WebDriver::Wait.new(:timeout => 15)
@naotookuda
naotookuda / refreash_helm.sh
Created November 17, 2017 00:53
How to refresh "helm" cache ?
# !/bin/bash
# Remove all files in these directories.
rm -rf ~/.helm/cache/archive/*
rm -rf ~/.helm/repository/cache/*
# Refreash repository configurations
helm repo update
#That's all.
#If you "helm search" next time, you can find newest stable charts in repository.
@xyzkab
xyzkab / aws-ec2-ami-modsecurity-setup.md
Last active April 4, 2024 15:48
Setup ModSecurity in AWS EC2 AMI

Setup ModSecurity in AWS EC2 AMI

Download dependencies

We need 3 rpm packages

rpms/bison-3.0.4-3.fc23.x86_64.rpm
rpms/yajl-2.1.0-4.fc23.x86_64.rpm
rpms/yajl-devel-2.1.0-4.fc23.x86_64.rpm

Install depedencies

@laurenfazah
laurenfazah / authentication_with_express_postgres.md
Last active July 13, 2024 16:51
Authentication with an Express API and Postgres

Authentication with an Express API and Postgres

Setting Up

Let's make sure our Express app has the required base modules:

# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon
@gillescastel
gillescastel / Ultisnip snippets
Last active February 1, 2024 13:39
Vimtex setup
snippet template "Basic template" b
\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[dutch]{babel}
\usepackage{amsmath, amssymb}
\begin{document}
@posener
posener / go-shebang-story.md
Last active July 13, 2024 16:35
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@kartiksura
kartiksura / main.go
Last active June 7, 2023 16:38
Querying AWS Athena using Golang SDK
package main
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/athena"
)