sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential libbz2-dev libdb5.3-dev libexpat1-dev libffi-dev libgdbm-dev liblzma-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev tcl-dev tk-dev zlib1g-dev tk openssl
cd /opt
sudo curl -sL https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz | sudo tar xJ
cd Python-3.7.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Restore settings of Git, GPG, SSH and direnv settings | |
| # Example: ./restore-git-opts.sh ~/git-opts-my-team ~/Projects/MyTeam | |
| # | |
| set -euo pipefail | |
| if [ $# -lt 2 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # Create an archive with Git, GPG, SSH and direnv settings | |
| # Example: ./dump-git-opts.sh my-team ~/Projects/MyTeam | |
| # | |
| set -euo pipefail | |
| if ! command -v realpath &>/dev/null; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chmod 700 ~/.gnupg | |
| chmod 600 ~/.gnupg/* | |
| find ~/.gnupg -type f -exec chmod 600 {} | |
| find ~/.gnupg -type d -exec chmod 700 {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template <class T, class CharType>class Parser | |
| { | |
| Parser(T &t) :: m_curr(t.begin()) , m_end(t.end()) {} | |
| bool next_char(CharType *c) { | |
| bool not_eof = m_curr != m_end; | |
| if (not_eof) { | |
| *c = *m_curr; | |
| m_curr++; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REM run as admin, picture must be JPEG, picture size must be not more than 256KB | |
| REM SET img_path=%1 or SET img_path="path to jpg" or | |
| SET img_path=%~dp0background.jpg | |
| SET bg_path=%SystemRoot%\system32\oobe\info\backgrounds | |
| MD %bg_path% | |
| COPY %img_path% %bg_path%\BackgroundDefault.jpg | |
| REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background" /v OEMBackground /t REG_DWORD /d 1 /f | |
| REM Shadow of controls: 0 - transparent shadow, 1 - shadow, 2 - no shadow | |
| REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI" /v ButtonSet /t REG_DWORD /d 1 /f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: Contact: ruzzzua@gmail.com | |
| :: Version: 2015.08.17 | |
| :: Dependencies: Android Debug Bridge (adb) | |
| @echo off | |
| set path="c:\Program Files\Android\android-sdk\platform-tools\";%path% | |
| set abi=arm | |
| :: adb remount | |
| :: adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system |
- Shell form: exec param
- Exec form: ["exec", "param"]
| No ENTRYPOINT | ENTRYPOINT e0 p0 | ENTRYPOINT ["e0", "p0"] | |
|---|---|---|---|
| No CMD | error | /bin sh -c e0 p0 | e0 p0 |
| CMD ["e1", "p1"] | e1 p1 | /bin sh -c e0 p0 | e0 p0 e1 p1 |
| CMD ["p1", "p2"] | p1 p2 | /bin sh -c e0 p0 | e0 p0 p1 p2 |
| CMD e1 p1 | /bin sh -c e1 p1 | /bin sh -c e0 p0 | e0 p0 /bin sh -c e1 p1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| chmod 700 ~/.ssh | |
| chmod 644 ~/.ssh/* | |
| chmod 600 ~/.ssh/id_rsa |
NewerOlder