还原老版YouTube UI

  • Use your browser cookie tool to find the cookie of youtube.com
  • Locate the Cookie with the name “PREF”
  • Change the value to or append to the end of the existing value “f6=4008”
2018.08.15
标签:
Category:未分类
42 views
No Comments

Read and Write BitLocker Protected NTFS Drives on Mac

Prerequisite

Install Dependencies

  1. Install FUSE for macOS (https://osxfuse.github.io/)
  2. Install cmake
    brew install cmake
  3. Install PolarSSL
    brew install PolarSSL
  4. Download Dislocker and unzip (assuming that you unzipped it into ~/Downloads/dislocker-master/ folder)
  5. Install Dislocker
    brew install ~/Downloads/dislocker-master/dislocker.rb

Load BitLocker Protected Drive

NTFS Filesystem

  • diskutil list
    • Use diskutil to find the identifier of your drive
  • mkdir -p /mnt/externalhdd
  • sudo dislocker-fuse -V /dev/<your_disk_identifier> -u<your_bitlocker_password> — /mnt/externalhdd/
  • sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount /mnt/externalhdd/dislocker-file
    • The output of this line is the path to the virtual device – it would be something like /dev/disk3
  • mkdir -p ~/Desktop/externalhdd
  • mount -t ntfs -o rw,auto,nobrowse <path_to_virtual_device> ~/Desktop/externalhdd

Then your disk will be shown on your desktop

Non-NTFS Filesystem

  • diskutil list
    • Use diskutil to find the identifier of your drive
  • mkdir -p /mnt/externalhdd
  • sudo dislocker-fuse -V /dev/<your_disk_identifier> -u<your_bitlocker_password> — /mnt/externalhdd/
  • sudo hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount /mnt/externalhdd/dislocker-file

Then you will be able to see your device in your finder’s “Devices” section

Unload Drive

  • Eject your drive by either right click-eject or eject from your finder’s “Devices” section
    • Or eject with command line
      sudo hdiutil eject ~/Desktop/externalhdd
  • hdiutil detach /mnt/externalhdd
  • Then it’s safe to remove your external drive
2018.07.17
标签:
Category:数自计
61 views
No Comments

Debian “Cannot set LC_ALL to default locale” Issue

Credit to raphaunix

echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8
2018.07.16
标签:
Category:数自计
27 views
No Comments

更改Docker Container端口

方法1

  1. stop running container
    docker stop test01
    
  2. commit the container
    docker commit test01 test02
    

    NOTE: The above, test02 is a new image that I’m constructing from the test01 container.

  3. re-run from the commited image
    docker run -p 8080:8080 -td test02

方法2

  1. stop running container
  2. find docker container in the file system
    1. In Linux, it’s most likely here
      /var/lib/docker/containers/
    2. In Mac, follow this document
  3. Update “PortBindings” in hostconfig.json, and “ExposedPorts”, “Ports” in config.v2.json or config.json
  4. Restart docker daemon
    /etc/init.d/docker restart
  5. start your container
2018.06.27
标签:
Category:未分类
29 views
No Comments

找回当前桌面背景图片文件 – Windows 7-10

C:\Users\[你的用户名]\AppData\Roaming\Microsoft\Windows\Themes\CachedFiles

2018.05.02
标签:
Category:未分类
16 views
No Comments