docker system prune --volumes --all
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 | |
| # Install Shadowsocks on CentOS 7 | |
| echo "Installing Shadowsocks..." | |
| random-string() | |
| { | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w ${1:-32} | head -n 1 | |
| } |
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
| SSH_ENV="$HOME/.ssh/environment" | |
| function start_agent { | |
| echo "Initialising new SSH agent..." | |
| /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
| echo succeeded | |
| chmod 600 "${SSH_ENV}" | |
| . "${SSH_ENV}" > /dev/null | |
| /usr/bin/ssh-add; | |
| } |
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
| Insert the following code into the *.VMX file: | |
| sched.mem.pshare.enable = "FALSE" | |
| mainMem.useNamedFile = "FALSE" | |
| prefvmx.minVmMemPct = "100" | |
| prefvmx.useRecommendedLockedMemSize = "TRUE" | |
| mainMem.partialLazySave = "FALSE" | |
| mainMem.partialLazyRestore = "FALSE" | |
| priority.grabbed = "high" | |
| priority.ungrabbed = "normal" |
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
| /*Queue - Linked List implementation*/ | |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct Node { | |
| int data; | |
| struct Node* next; | |
| }; | |
| // Two glboal variables to store address of front and rear nodes. | |
| struct Node* front = NULL; | |
| struct Node* rear = NULL; |
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
| # perform a fresh install of Ubuntu 17.10 | |
| # upgrade the kernel to v4.13.10 | |
| mkdir ~/kernel-v4.13.10 | |
| cd ~/kernel-v4.13.10 | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb | |
| sudo dpkg -i *.deb |
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
| # taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
| # generate server.xml with the following command: | |
| # openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
| # run as follows: | |
| # python simple-https-server.py | |
| # then in your browser, visit: | |
| # https://localhost:4443 | |
| import BaseHTTPServer, SimpleHTTPServer | |
| import ssl |
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
| # Restart conputer | |
| shutdown –t 0 –f –r | |
| # Shutdown conputer | |
| shutdown –t 0 –f –s |
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
| # https://apple.stackexchange.com/questions/51036/what-is-the-difference-between-bash-profile-and-bashrc | |
| # .bash_profile | |
| if [ -f ~/.bashrc ]; then | |
| . ~/.bashrc | |
| fi |
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
| # Make sure git uses rebase instead of merge by default | |
| git config --global branch.autosetuprebase always |
OlderNewer