Skip to content

Instantly share code, notes, and snippets.

View pry0cc's full-sized avatar
💭
Hacking the Planet

pry0cc pry0cc

💭
Hacking the Planet
View GitHub Profile
@pry0cc
pry0cc / reverse-ssh.sh
Created August 5, 2015 22:10
A reverse ssh script.
mode=$1
local_ip=$2
local_port=$3
function serv_ins {
echo "ssh -N -R $local_port:localhost:22 root@$local_ip" | sudo timeout 2 nc -l -c -p $local_port
}
if [ $mode = -s ]
then
@pry0cc
pry0cc / backup.sh
Created May 16, 2015 16:29
Backup script
echo " ____ _ ____ _ ___ _ ____ "
sleep 0.1
echo "| __ ) / \ / ___| |/ / | | | _ \ "
sleep 0.1
echo "| _ \ / _ \| | | ' /| | | | |_) |"
sleep 0.1
echo "| |_) / ___ \ |___| . \| |_| | __/"
sleep 0.1
echo "|____/_/ \_\____|_|\_\\___/|_| "
echo ""
LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
def main():
# This text can be copy/pasted from http://invpy.com/vigenereCipher.py
myMessage = input("Input a message >>> ")
myKey = input("Input a keyword >> ")
opt = input(" E for Encrypt or D for Decrypt? >> ") # set to 'encrypt' or 'decrypt'
if (opt == "e"):
myMode = "encrypt"
else:
@pry0cc
pry0cc / .conkyrc
Created April 19, 2015 18:34
My conkyrc file that works with my i3 desktop
own_window yes
own_window_type override
own_window_class conky
own_window_argb_visual
own_window_transparent yes
draw_shades no
alignment bottom_middle
background yes
gap_y 28
@pry0cc
pry0cc / CaesarCipher.c
Created February 6, 2015 23:26
CaesarCipher in C! Will probably only work on Linux/Unix, I used the -std=c99 compiler.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
/*encypt.c*/
// Function prototypes
int CipherChar(char *s, int offset);
int CipherStr(char *s, int offset);
@pry0cc
pry0cc / progress.py
Last active August 29, 2015 14:13
The Dysfunctional Progress Bar - A progress bar, by me. xD
#!/usr/bin/env python
import time
import sys
import os
#################### By Pry0cc - The Dysfunctional Progress bar ####################
### Credit from stack overflow - A function to get height and width of terminal window
@pry0cc
pry0cc / spacegray-stylish.css
Last active August 29, 2015 14:10
SpaceGray Base 16 Eighties Dark theme for stylish
/* * * * * *
Adapted from:
http://noha-ra.deviantart.com/art/Melbourne-Firefox-CSS-FF-29-and-above-473887761
* * * * * * */
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/*remove internal border*/
#!/usr/bin/perl
use warnings;
use strict;
use LWP::Simple;
my $distro;
if ($ARGV[0]) {
print "Searching $ARGV[0]\n";
@pry0cc
pry0cc / wallbasegrab.sh
Created July 27, 2014 17:55
Uses wget to download image from wallbase.cc - Just append page url as a command line argument
#!/bin/bash
wget $(wget -O - $1 | grep 'jpg\|png' | grep wallpaper | sed 's/<img src="//g' | sed 's/" class="wall stage1 wide">//g')
@pry0cc
pry0cc / wallbaseswitch.sh
Created July 27, 2014 17:53
A handy little script I wrote to randomly change my wallpapers with feh. Does require images to contain a 2 digit number - Like the images on wallbase.cc
#!/bin/bash
cd ~/Pictures/Wallbase/
while [ 1 ]
do
feh --bg-scale $(ls | grep $[ ( $RANDOM % 100 ) + 1 ])
sleep 10
done