Skip to content

Instantly share code, notes, and snippets.

View carry0987's full-sized avatar
:electron:

carry0987 carry0987

:electron:
View GitHub Profile
@carry0987
carry0987 / RPi3-SSH-Access-On-volumio.md
Created July 23, 2018 17:15
RPi3-SSH-Access-On-volumio

SSH Access On volumio

Login

User: volumio
Password: volumio

Method

  1. File
    Just create or copy a file called ssh in /boot . You can do it right after flashing Volumio, by creating it in the "Boot" partition of your SD Card.
@carry0987
carry0987 / RPi3-HentaiAtHome.md
Last active July 24, 2018 19:34
Raspberry Pi 3B+ Run HentaiAtHome On Portable External Hard Drive

Raspberry Pi 3B+ Run HentaiAtHome On Portable External Hard Drive

Install Required Tools

sudo apt-get install screen

sudo apt-get install vim

sudo apt-get install openjdk-8-jdk

sudo apt-get install openjdk-8-jre

@carry0987
carry0987 / RPi3-Disable-Cron-Pam-Unix-Session.md
Last active August 17, 2018 12:34
RPi3-Disable-Cron-Pam-Unix-Session

RPi3 Disable Cron Pam_Unix Session

Step

  1. Use sudo vim /etc/pam.d/common-session-noninteractive to edit the settings

  2. Find this line

    session required pam_unix.so
    
@carry0987
carry0987 / RPi3-Add-IMG-To-Berryboot.md
Last active August 17, 2018 12:35
RPi3-Add-IMG-To-Berryboot

RPi3 Add IMG To Berryboot

Adding your own custom operating systems to the menu

Most Raspberry Pi operating system images are disk images containing two partitions. A FAT partition with the boot loader and kernel files, and a second Ext4 partition with everything else. We are interested in the second partition.

With a regular Linux desktop computer that has kpartx and mksquashfs installed, you can convert the second partition to SquashFS like this:

@carry0987
carry0987 / RPi3-Set-LC.md
Last active August 17, 2018 12:35
RPi3-Set-LC

RPi3 Set LC

Required Tools

You can use Nano or Vim, here I use nano to edit locale

Step

  1. Use sudo nano /etc/default/locale to edit locale file

  2. Put following content into locale

@carry0987
carry0987 / RPi3-Change-Berryboot-Default-System-By-SSH.md
Last active September 19, 2018 01:43
RPi3-Change-Berryboot-Default-System-By-SSH

RPi3 Change Berryboot Default System By SSH

Step

  1. Use sudo mount /dev/mmcblk0p2 /mnt to mount raw storage

  2. Use ls /mnt/images to check what the full file name of the operating you would like to run

  3. Use sudo su to change user into root

@carry0987
carry0987 / RPi3-Auto-Email-New-Public-IP-If-Changed-Python3.md
Last active September 19, 2018 01:58
RPi3-Auto-Email-New-Public-IP-If-Changed-Python3

RPi3 Auto Email New Public IP If Changed (Python3)

Step

  1. Use wget to download IP-Reporting script

    sudo wget https://raw.github.com/carry0987/Raspberry-Pi-Repo/master/Auto-Report-IP/report-ip.py
    

  2. Give the script executing permission

@carry0987
carry0987 / RPi3-Internet-Speedtest.md
Last active December 2, 2018 17:47
RPi3-Internet-Speedtest

RPi3-Internet-Speedtest

Step

  1. Download speedtest python script from Sivel sudo wget https://raw.github.com/sivel/speedtest-cli/master/speedtest.py

  2. Use sudo chmod a+rx speedtest.py to make speedtest.py can be executed

@carry0987
carry0987 / Diskpart.md
Created February 26, 2019 07:05
Diskpart

diskpart.txt

select disk 1
clean
convert gpt
create partition primary
assign letter=F
format fs=ntfs label=backup quick

Do

@carry0987
carry0987 / Emmet-PHP.md
Last active May 12, 2019 03:39
Emmet-PHP

Emmet-PHP

How to expand abbreviations with Tab in other syntaxes

Emmet expands abbreviations in limited syntaxes only: HTML, CSS, LESS, SCSS, Stylus and PostCSS.
The reason to restrict Tab handler to a limited syntax list is because it breaks native Sublime Text snippets.
If you want to abbreviation with Tab in other syntaxes (for example, JSX, HAML etc.) you have to tweak your keyboard shorcuts settings:
add expand_abbreviation_by_tab command for tab key for required syntax scope selectors.
To get current syntax scope selector, press ⇧⌃P (OSX) or Ctrl+Alt+Shift+P, it will be displayed in editor status bar.