Skip to content

Instantly share code, notes, and snippets.

@Luro02
Luro02 / handbrake.bat
Created November 30, 2017 16:03
very simple script for burning in reliably (hopefully) subtitles into the mkv and converting them to .mp4 ! This script needs HandbrakeCLI in path variables or in the same directory. You can download it from here: https://handbrake.fr/downloads2.php
@echo off
:: The Command and conversion is copy&pasted from the Internet and I only added the subtitle command and the for loop....
:: if it's givin you an error delete the ">>log.txt" (didn't test if it's working but it should echo everything into a file called "log.txt")
:: You can delete the Lines starting with "::" (they are ignored)
for %%i in (*.mkv *.avi) do (
HandBrakeCLI -i "%%i" -o "%%~ni.mp4" -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 --loose-anamorphic --modulus 2 -m --x264-preset veryfast --h264-profile main --h264-level 4.0 -s "1,2,3,4,5,6" --subtitle-burned
rm -f "%%i"
)>>log.txt
@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 / ubuntu16.10-command-line-install-android-sdk
Last active February 1, 2018 09:48 — forked from wenzhixin/ubuntu14.04-command-line-install-android-sdk
Ubuntu 16.10 command line install android sdk
# install openjdk
sudo apt-get install openjdk-9-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz -C $HOME
cd $HOME/android-sdk-linux/tools
@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 / 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
@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
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 / 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

#!/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 / 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.