Skip to content

Instantly share code, notes, and snippets.

@Sfinx
Sfinx / rm_protect.sh
Last active July 17, 2022 11:07
Simple bashrc protection for accidental "rm *"
rm_protect() {
for i in "$@"
do
if [ "$i" = '*' ] ;then
echo -n "Are you sure [rm * in $PWD] ? "
read j
if [ "$j" != y ]; then return; fi
fi
done
set +f
@Sfinx
Sfinx / chrome_pass_decode.py
Created September 27, 2021 01:37
Decode chrome passwords DB under Linux
! /usr/bin/env python3
import sys
import sqlite3
import secretstorage
from Crypto.Cipher import AES
from Crypto.Protocol.KDF import PBKDF2
@Sfinx
Sfinx / index.html
Created June 9, 2017 08:27
Car quote bot using API.ai
<html>
<head>
<title>Barry</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.responsivevoice.org/responsivevoice.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/annyang/2.6.0/annyang.min.js"></script>
<script type="text/javascript">
var accessToken = "5080ab2c28204a0a82de12bba8068f82",
baseUrl = "https://api.api.ai/v1/",
@Sfinx
Sfinx / index.html
Last active June 11, 2017 13:43
d3js v4 zoomable/pannable sunburst with labels
<!DOCTYPE html>
<meta charset="utf-8">
<style>
path {
stroke: #000;
stroke-width: 1.5;
cursor: pointer;
}