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
| apt-get install ca-certificates | |
| update-ca-certificates |
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
| md5deep -l -o f -r folder1 -r folder2 | |
| # equals to | |
| find folder1 -type f -exec md5sum {} \; |
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
| package=$1 | |
| apt-get download $package 2>>errors.txt | |
| depends=$(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances $package | grep -E 'Depends|Recommends|Suggests' | cut -d ':' -f 2,3 | sed -e s/'<'/''/ -e s/'>'/''/ -e 's/ //' | sort | uniq) | |
| for i in $depends | |
| do | |
| apt-get download $i 2>>errors.txt | |
| done |
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
| docker image save redis | gzip > redis.tgz | |
| docker image save rabbitmq | gzip > rabbitmq.tgz | |
| gunzip -c rabbitmq.tgz | docker load | |
| gunzip -c redis.tgz | docker load |
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
| git clone -c core.sshCommand="ssh -i /path/to/id_rsa" [email protected]:user/repo.git |
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
| yum update | |
| yum install epel-release | |
| yum install supervisor | |
| systemctl enable supervisord | |
| systemctl start supervisord | |
| cd /etc/supervisord.d |
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
| import signal | |
| import functools | |
| async def looping_task(loop, task_num): | |
| try: | |
| while True: | |
| print('{0}:in looping_task'.format(task_num)) | |
| await asyncio.sleep(5.0, loop=loop) | |
| except asyncio.CancelledError: | |
| return "{0}: I was cancelled!".format(task_num) |
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
| surface: | |
| size: [500, 500] | |
| mode: "L" | |
| background: [255] | |
| position: [250, 250] | |
| zoom: 0.5 | |
| discreet: 10 | |
| elements: | |
| face: |
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
| docker run --rm \ | |
| -p 8888:8888 \ | |
| -v $PWD:/home/jovyan/pwd \ | |
| --env JUPYTER_ENABLE_LAB=yes \ | |
| --env JUPYTER_TOKEN=asd \ | |
| --name ihaskell_notebook \ | |
| crosscompass/ihaskell-notebook:latest |
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
| from itertools import tee, chain | |
| def sort_c(it): | |
| xs = iter(it) | |
| x = next(xs) | |
| xs1, xs2 = tee(xs) | |
| yield from chain( | |
| sort_c(filter(lambda i: i < x, xs1)), | |
| [x], |