Skip to content

Instantly share code, notes, and snippets.

View RealStr1ke's full-sized avatar
💭
GPT - Greedy Pickle Tyrant

Thandi R. Menelas RealStr1ke

💭
GPT - Greedy Pickle Tyrant
View GitHub Profile
@supertunaman
supertunaman / drawbat.sh
Created March 10, 2011 23:46
A battery life indicator that fits nicely in a $PS1
#!/bin/bash
endcolor="\033[1;31m"
innercolor="\033[1;33m"
nocolor="\033[0m"
charge_now=$(cat /sys/class/power_supply/BAT0/charge_now)
charge_full=$(cat /sys/class/power_supply/BAT0/charge_full)
percent=$(echo "scale=2; ( $charge_now / $charge_full ) * 100" | bc | sed 's/\(.*\).../\1/g')
bars=$(echo "($percent / 20) + 1" | bc)
//purpleposeidon@gmail.com
//Mar 15 2011
//Checks the battery level every so often, and writes a color code escape sequence to ~/.battery_color
//compile this program, have it run at startup:
// crontab -e
// @reboot /home/USER/bin/batcolor
//Or something
//Change PS1 to cat ~/.battery_color in .bashrc
//Here's mine:
@janmoesen
janmoesen / .bash_profile
Created August 19, 2011 06:01
Temporary .bash_profile
# ============== shell
# Case-insensitive globbing.
shopt -s nocaseglob;
# Do not overwrite files when redirecting using ">", ">&" or "<>".
# Note that you can still override this with ">|".
set -o noclobber;
# UTF-8 all the way.
export LC_ALL='en_GB.UTF-8';
# -*- coding: utf-8 -*-
import click
import os
import pandas as pd
def file_split(file):
s = file.split('.')
name = '.'.join(s[:-1]) # get directory name
# -*- coding: utf-8 -*-
import click
import os
import pandas as pd
def file_split(file):
s = file.split('.')
name = '.'.join(s[:-1]) # get directory name
This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 17, 2024 11:25 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@wolfv6
wolfv6 / switch_sound.sh
Last active September 10, 2023 17:23
switch_sound.sh is a script that switches between speaker and headphone with one mouse click.
#!/bin/bash
################################### license ##################################
# switch_sound.sh is a script that switches between speaker and headphone with one mouse click.
# Written in 2018 by Wolfram Volpi, contact at https://gist.github.com/wolfv6/df6deb2ac7667d16d621d6da79ef99e0
# To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.
# This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along with this software.
# If not, see http://creativecommons.org/publicdomain/zero/1.0/.
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*
@sundowndev
sundowndev / GoogleDorking.md
Last active July 16, 2024 20:38
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"