Skip to content

Instantly share code, notes, and snippets.

@dreamer2908
dreamer2908 / register_baidu.md
Last active May 5, 2024 17:13
Register a Baidu account to download stuff???

Idea from ShinyMarusu @ Reddit:

  • https://www.reddit.com/r/Piracy/comments/auhyxk/how_do_i_download_from_panbaidu/eovyg8g/
  • I just unintentionally discovered how to do it after searching how to create an account for day and a half. LOL hope it works for you too.
  • First go to this link (baidu cloud app) to register. Use your phone number to get the verification code and enter. For the rest, use google to translate the page and put your email adress, name, etc. and you're good to go. This method logs you to the cloud directly so you just step over the problematic pan,baidu registration which rejects non-chinese phone numbers for some reason. After registering I refreshed the page of the file I was trying to download and it showed me as already logged in, then I FINALLY could download the mod. It's sad this method isn't listed anywhere, I really searched a lot... Anyways, good luck!

More notes:

  • It's a pain in the rear. It took me an hour, but at least it worked.
  • Get an Chinese email. You will use it as yo
@dreamer2908
dreamer2908 / Some ways to change the serial number of exFAT partitions.md
Last active November 6, 2023 14:08
Some ways to change the serial number of exFAT partitions

(Note: limited usefulness, only for some specific uses. Or for fun, because it can be done.)

I want to upgrade the sdcard (32GB in FAT32) in my Android phone to a new 128GB one but I want the mount location to stay the same, i.e /storage/xxxx-xxxx (volume serial number, 8 random hex numbers like 1234-ABCD)

If I format the card, the volume serial number will be randomly generated, so the location changes. Thus, I need to re-allow file access right for some apps, fix some sync jobs, rebuild my music playlists, etc. :effort: I want to keep the serial number as-is.

One option is to clone the partition on the old card to the new one: the serial number will stay the same, and FAT32 does work with 128GB cards. But I don't want FAT32 anymore due to its 4GB file size limit as I want to carry large ISO and movie files. NTFS isn't supported because Lenovo doesn't pay Paragon or Tuxera to get their commercial NTFS drivers. So exFAT is selected.

@dreamer2908
dreamer2908 / dirty_cow_test.sh
Created February 1, 2017 12:14
An easy script to check if your Debian-based system is exploitable by Dirty COW
#!/bin/bash
# This is an easy script to check if your Debian-based system is exploitable by Dirty COW.
# It's based on Dave Macaulay's script http://davemacaulay.com/easily-test-dirty-cow-cve-2016-5195-vulnerability/
# In his script, the reference exploit program is run as root
# This still does give the correct result.
# However, Dirty COW is a Linux root exploit; it is used to gain root access from an unprivileged local user.
# It's plainly wrong to run the expoit program as root in the first place.
# Preparation
@dreamer2908
dreamer2908 / How to VapourSynth, flash3kyuu_db for mpv on Ubuntu & Mint.rst
Last active February 1, 2024 21:28
A short guide to build & install VapourSynth, flash3kyuu_db and use it with mpv for debanding video on playback on Ubuntu & Mint

A short guide to build & install VapourSynth, flash3kyuu_db and use it with mpv for debanding video on playback on Ubuntu & Mint

Based on ChrisK2's "How to Vapoursynth + flash3kyuu_db for mpv on Mac OS X" guide https://gist.github.com/ChrisK2/10606922

VapourSynth

  • Install basic building tools: sudo apt-get install build-essential yasm intltool automake autoconf libtool devscripts equivs
  • Install the libraries and headers for libavutil, libavcodec, and libswscale: sudo apt-get install libavutil-dev libavcodec-dev libswscale-dev
@dreamer2908
dreamer2908 / fonts.conf
Last active October 10, 2021 22:36 — forked from silv3rm00n/.fonts.conf
Configuration file for fontconfig for much better font rendering. Put it in "~/.config/fontconfig/fonts.conf". Fixed "Having multiple values in <test> isn't supported and may not work as expected", and "saw number, expected matrix" warnings; stopped replacing Courier New with Droid Sans Mono and Times New Roman with Noto Serif/Droid Serif.
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!--
Save this to ~/.config/fontconfig/fonts.conf
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal