Skip to content

Instantly share code, notes, and snippets.

View joekendal's full-sized avatar
:shipit:

J Kendal joekendal

:shipit:
View GitHub Profile
@joekendal
joekendal / bash_prompt.sh
Created August 11, 2018 02:23
a nice-looking shell prompt
PS1='\[\e[0;37m\]\[\e[0m\]┌─[\[\e[0;96m\]\u\[\e[37m\]@\[\e[0m\]\h] \n└─[\[\e[1;37m\]\W\[\e[0m\]]> '
@joekendal
joekendal / login.php
Created December 18, 2017 21:15
CSRF protected login page
<?php
session_start();
$errors = [];
if(isset($_SESSION['auth'])){
if($_SESSION['auth']){
header("Location: /");
}
}
if (empty($_SESSION['token'])) {
@joekendal
joekendal / pwgen.py
Last active April 15, 2017 19:45
Safari Password generator in python
from random import SystemRandom
from string import ascii_letters, digits
print('-'.join((''.join(SystemRandom().choice(ascii_letters + digits) for i in range(3))) for i in range(4)))