I hereby claim:
- I am Sam-Gram on github.
- I am samgram (https://keybase.io/samgram) on keybase.
- I have a public key whose fingerprint is C51D 6533 96DE 814D 1DEE CA3E 3D20 1342 A2A7 2CF4
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# All commands start in project root | |
# Get back corrupted objects | |
git fetch -p | |
git unpack-objects < <new clone of remote>/.git/objects/pack/pack-<hash>.pack | |
#.get rid of empty files if git fsck isn't working or just in general | |
cd .git; find . -type f -empty -delete -print | |
# Find problems (anything other than dangling commit/object is a problem) |
/** | |
GLWT(Good Luck With That) Public License | |
Copyright (c) Everyone, except Author | |
The author has absolutely no clue what the code in this project does. | |
It might just work or not, there is no third option. | |
Everyone is permitted to copy, distribute, modify, merge, sell, publish, | |
sublicense or whatever they want with this software but at their OWN RISK. |
awk 'tolower($1) ~ /memfree/ {print $2/1000 " MB"}' /proc/meminfo | |
#GLWT(Good Luck With That) Public License | |
#Copyright (c) Everyone, except Author | |
#The author has absolutely no clue what the code in this project does. | |
#It might just work or not, there is no third option. | |
#Everyone is permitted to copy, distribute, modify, merge, sell, publish, | |
#sublicense or whatever they want with this software but at their OWN RISK. | |
# GOOD LUCK WITH THAT PUBLIC LICENSE | |
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION | |
#0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A |
# Stolen from https://gist.github.com/willurd/5720255 | |
$Hso=New-Object Net.HttpListener;$Hso.Prefixes.Add("http://+:8000/");$Hso.Start();While ($Hso.IsListening){$HC=$Hso.GetContext();$HRes=$HC.Response;$HRes.Headers.Add("Content-Type","text/plain");$Buf=[Text.Encoding]::UTF8.GetBytes((GC (Join-Path $Pwd ($HC.Request).RawUrl)));$HRes.ContentLength64=$Buf.Length;$HRes.OutputStream.Write($Buf,0,$Buf.Length);$HRes.Close()};$Hso.Stop() |
rg -g '<something>*' --files --hidden 2>/dev/null |
/** | |
GLWT(Good Luck With That) Public License | |
Copyright (c) Everyone, except Author | |
The author has absolutely no clue what the code in this project does. | |
It might just work or not, there is no third option. | |
Everyone is permitted to copy, distribute, modify, merge, sell, publish, | |
sublicense or whatever they want with this software but at their OWN RISK. | |
GOOD LUCK WITH THAT PUBLIC LICENSE | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION | |
0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A |
# I put this in my .bashrc. | |
whatismyip () | |
{ | |
host myip.opendns.com resolver1.opendns.com | grep --color=auto 'has address' | awk '{print $4}' | |
} | |
#GLWT(Good Luck With That) Public License | |
#Copyright (c) Everyone, except Author |
#!/bin/bash | |
interval="1000" | |
file="file://$HOME/Documents/output.png" | |
echo $file | |
while true; do | |
window_size=`xdpyinfo | grep dimensions | awk '{ split($2,resArr,"x");print resArr[1] "," resArr[2]}'` | |
google-chrome --headless --disable-gpu --screenshot=output.png --virtual-time-budget=4000 --window-size=$window_size "https://www.windy.com/43.453/-111.445?42.956,-111.044,8" | |
gsettings set org.gnome.desktop.background picture-uri $file |
#!/usr/bin/env python | |
# ftpserver-cli.py | |
# Example use: | |
# sudo ./test.py --username=login --password=1234 --port=8007 --directory=$PWD | |
import sys | |
sys.path.append("/home/sam/.local/lib/python2.7/site-packages") # enter your proper path here | |
import argparse | |
from pyftpdlib.authorizers import DummyAuthorizer | |
from pyftpdlib.handlers import FTPHandler |