Skip to content

Instantly share code, notes, and snippets.

View skulltech's full-sized avatar
🌏
Learning

Sumit Ghosh skulltech

🌏
Learning
View GitHub Profile
@skulltech
skulltech / keybase.md
Created February 21, 2023 17:04
Keybase proof

Keybase proof

I hereby claim:

  • I am skulltech on github.
  • I am sumitg (https://keybase.io/sumitg) on keybase.
  • I have a public key ASAFCVkzRrw8ZdH4vGEiRk6zjFfjFgDROI_IMeWC4yHlaQo

To claim this, I am signing this object:

@skulltech
skulltech / config.yaml
Last active May 7, 2022 09:35
Solana x Anchor Github Action
name: Build
on:
pull_request:
branches: [master]
types: [opened, reopened, updated, synchronize]
jobs:
format:
name: Format and lint code
runs-on: ubuntu-latest
@skulltech
skulltech / battery-alert.sh
Created January 10, 2021 05:49
Bash script for maintaining optimal battery charging range on a laptop
#!/bin/bash
while true; do
export DISPLAY=:0.0
battery_level=$(acpi -b | grep -m1 -P -o '[0-9]+(?=%)' | awk '$1>0 { print $0; }')
ac_power=$(acpi -a | cut -d' ' -f3 | cut -d- -f1)
if [ "$ac_power" = "on" ]; then
if [ "$battery_level" -ge 80 ]; then
notify-send -u critical "Please unplug your AC adapter" "Battery level: ${battery_level}%" -i battery-full-charged
fi
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDDzMSSuEky2HWKy3/p01BXURLkYhDkJ+Wpd45kU7s0737LXx9zhRqWyX0pnUcGf1A5uKpy6JiaHNjRT/PBKMye0ej1CSurPZXOEyjSSK4MlW8NkRAHiLBuBAhetG3jANWKxcvsvsp172XdK8yP81B0w4qlKQz7J5GbALuwSwFEQu01tjf4aErEvV8xXxl2y1O8DMxjTiXT2WLTeoUDQldBm3m56ogtajnJz7USiZPePUZHcm6DMp9/2+ucef3/1AAtK0adQzwhnj6W+0eCTqdQz+DF9erqsMkd7QoRaQ0/ZK/rqljMwdbux6NySA1U5Zx2JaNUlClmfqxlkBm8TbY7 sumit@sumit-ghosh.com
@skulltech
skulltech / dl.py
Created February 6, 2018 23:50
Handy Python function for downloading file with progress bar
import sys
import requests
def download(url, filename):
with open(filename, 'wb') as f:
response = requests.get(url, stream=True)
total = response.headers.get('content-length')
if total is None:
@skulltech
skulltech / environment
Created March 10, 2017 17:56
Environment Variables required for Internet access through IITD Proxy.
http_proxy=http://proxy22.iitd.ac.in:3128
https_proxy=https://proxy22.iitd.ac.in:3128
no_proxy=.iitd.ac.in,.iitd.ernet.in
auto_proxy=http://www.cc.iitd.ernet.in/cgi-bin/proxy.btech
HTTP_PROXY=http://proxy22.iitd.ac.in:3128
HTTPS_PROXY=https://proxy22.iitd.ac.in:3128
NO_PROXY=.iitd.ac.in,.iitd.ernet.in
AUTO_PROXY=http://www.cc.iitd.ernet.in/cgi-bin/proxy.btech
@skulltech
skulltech / apk-embed-payload.rb
Last active April 1, 2023 04:50
POC for injecting Metasploit payloads on arbitrary APKs
#!/usr/bin/env ruby
# apk_backdoor.rb
# This script is a POC for injecting metasploit payloads on
# arbitrary APKs.
# Authored by timwr, Jack64
#
require 'nokogiri'
require 'fileutils'
@skulltech
skulltech / wdstart.py
Created March 6, 2016 15:24
Reliable module for starting up Selenium Webdriver, with custom user-agent and custom profile
"""
Standard and reliable module for starting up Selenium Webdriver, with custom user-agent and custom profiles.
"""
import os
import subprocess
import sys
import urllib
from selenium import webdriver