Discover gists
This file contains 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 | |
sed -i -e 's/Anarchy/Arch/g' /etc/lsb-release | |
sed -i -e 's/Anarchy/Arch/g' /etc/os-release | |
sed -i -e 's/anarchy/arch/g' /etc/os-release | |
sed -i -e 's/arch-linux/www.archlinux/g' /etc/os-release | |
echo 'SUPPORT_URL="https://bbs.archlinux.org/"' >> /etc/os-release | |
echo 'BUG_REPORT_URL="https://bugs.archlinux.org/"' >> /etc/os-release | |
cp /etc/os-release /usr/lib/os-release | |
head -n -2 /etc/lightdm/lightdm-gtk-greeter.conf > lightdm-gtk-greeter.conf | |
mv lightdm-gtk-greeter.conf /etc/lightdm/ |
This file contains 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
These are the two steps you need to take to get S3 to work with Digital Ocean Spaces. | |
https://github.com/humanmade/S3-Uploads |
A simple Ghostscript command to merge two PDFs in a single file is shown below:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdf
Install Ghostscript:
Type the command sudo apt-get install ghostscript
to download and install the ghostscript package and all of the packages it depends on.
Before starting, make sure you have a backup, and make sure to have a linux live boot ready to rescue your system. It's easy to mess this up!
- Use gdisk to convert the partition table to GPT.
gdisk /dev/sda
- Create the "BIOS boot" partition that GRUB needs.
n
to create a new partition. Needs to be about 1MB. You can probably squeeze this in from sectors 34-2047. UseL
orl
to look up the code for "BIOS boot" (ef02). - Write the new partition table.
w
- Reload the partition table.
>
partprobe /dev/sda
This file contains 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
/** | |
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). | |
* (c) Chris Veness MIT Licence | |
* | |
* @param {String} plaintext - Plaintext to be encrypted. | |
* @param {String} password - Password to use to encrypt plaintext. | |
* @returns {String} Encrypted ciphertext. | |
* | |
* @example | |
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw'); |
- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
source: http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/
- Ctrl + a – go to the start of the command line
- Ctrl + e – go to the end of the command line
- Ctrl + k – delete from cursor to the end of the command line
- Ctrl + u – delete from cursor to the start of the command line
- Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)
- Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
NewerOlder