Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python3
#
# Written for Python 3.7
from __future__ import annotations
from typing import Callable
def and_x(a: bool, b: bool) -> bool:
return a and b
def or_x(a: bool, b: bool) -> bool:
@Luro02
Luro02 / ubuntu_fix.md
Last active February 10, 2019 09:09
A little tutorial for future ubuntu users, that have a fucked up apt/dpkg database and want to fix it

The Problem:

After some time the package database might get broken because you installed some incomplete stuff or did some installations manually, without thinking what you were doing. Now you get a warning everytime you run an apt-command, or even worse: it refuses to install anything.

How I fixed it:

run the following commands:

sudo bash

mv /var/lib/dpkg/status /var/lib/dpkg/status_bkup

check under what name it is installed:
$ dkpkg -l | devkitpro
it either outputs nothing -> not installed
or it ouputs the package name
$ sudo dpkg -P devkitpro-pacman
that's it now you can reinstall it and it should work again :3
@Luro02
Luro02 / export.json
Created July 16, 2018 15:28
A huge JSON file containing all entries from here: http://crackmes.cf/archive/ , that will give you the ability to easily batch process the database! Happy Cracking :)
This file has been truncated, but you can view the full file.
{
"1133": {
"url": "http://crackmes.cf/users/.nalet./nalets_crackme_no1/download/NaLeTcrkMe.zip",
"description": "First off don't give me that \"cr*pware\" things.\nYes, it's written in VB + P-Code, and all you need to do is find one serial.\nOh could someone rate it?!?",
"difficulty": 2,
"platform": "Windows",
"language": "(Visual) Basic",
"published": "2005-03-08T00:00:00",
"downloads": 1235,
"votes": 0
@Luro02
Luro02 / hosts.txt
Last active April 15, 2024 05:37
A blocklist for the Amazon Fire devices, that should block (some) telemetry...
# Amazon Fire (HD 8) Blocklist (V.1.0)
#
# Constribute:
# please make a comment under this gist and I'll add it after checking to this list.
#
# Constributions by:
# Luro02
#
# Credits:
# https://forum.xda-developers.com/amazon-fire/general/how-to-block-updates-via-router-t3640267
@Luro02
Luro02 / h-encore.py
Created July 2, 2018 13:16
Very early stage of a possible way to install H-encore....
#!/usr/bin/env python3
"""
Do whatever you want with it...
I am too lazy to make it compatible on other platforms or create a gui...
this thing works and it should do the job for some people/may be a help for
someone who is working on this:
https://www.reddit.com/r/vitahacks/comments/8vbkf8/concept_how_to_make_a_proper_user_friendly/
Made by Luro02 in under 2 hours (I know, impressive)
"""
import os
@Luro02
Luro02 / psdle.py
Last active April 17, 2021 10:18
Have fun with it :), v1.0 ; works fine for me at least....
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# psdle.py -- does the same thing as PSDLE does...
# Copyright (C) 2018 Gnarmagon
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@Luro02
Luro02 / pdb.py
Created February 13, 2018 17:27
partially working implementation of how the PSVita creates PDB's....
#!/usr/bin/env python3
def create_pdb(filename, title, location, pkg_link, icon_path, temp_dat, cid, date='Wed, 16 Apr 2008 11:11:41 GMT'):
"""
Example:
title = 'Ape Quest'
location = 'ux0:pspemu/bgdl/0000010d'
pkg_name = 'cCC53YedwIstMh54hhulsqmHmlLCMr4He9aKSNFGRTDNGvcUgcqpqbAcFU25tJC8PN1ksFVqlErDjeHYyijpCfqHD5WSAu6qqEDlt.pkg'
pkg_link = 'http://zeus.dl.playstation.net/cdn/EP9000/NPEG00005_00/cCC53YedwIstMh54hhulsqmHmlLCMr4He9aKSNFGRTDNGvcUgcqpqbAcFU25tJC8PN1ksFVqlErDjeHYyijpCfqHD5WSAu6qqEDlt.pkg?country=de'
icon_path = 'ux0:bgdl/t/0000010d/icon.png'
@Luro02
Luro02 / avctomp4.cmd
Created January 24, 2018 17:25
some scripts that help extracting and converting some file formats (avc video files and farc files)
for %%i in (*.avc) do (
ffmpeg -i "%%i" -codec copy "%%~ni.mp4"
)
@Luro02
Luro02 / install_dep.bat
Last active March 30, 2018 06:22
if you never installed python or don't have panda + wget installed (python3 modules) then execute the install_dep.bat first
@echo off
WHERE python
IF %ERRORLEVEL% NEQ 0 (
IF NOT EXIST Anaconda3-5.0.1-Windows-x86_64.exe wget --no-check-certificate https://repo.continuum.io/archive/Anaconda3-5.0.1-Windows-x86_64.exe
start /wait Anaconda3-5.0.1-Windows-x86_64.exe
echo press a button if the installer closed !
pause
)
IF NOT EXIST psdle.py wget --no-check-certificate https://gist.githubusercontent.com/Gnarmagon/1cf55fd844779f69791e9bad600aaae6/raw/e7464647285cc08f9ce070bea6722f10fedffd67/psdle.py