All commands are run as root.
Create the swap file using either of these commands. fallocate is faster but may not work on all filesystems.
fallocate -l 32G /swap/swap0| #!/bin/sh | |
| # SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]> | |
| # | |
| # SPDX-License-Identifier: MIT | |
| arch=$(dpkg --print-architecture) | |
| echo "Detected architecture: $arch" | |
| case "$arch" in |
| #!/bin/bash | |
| # copymysql.sh | |
| # GENERATED WITH USING ARTUR BODERA'S SCRIPT | |
| # Source script at: https://gist.github.com/2215200 | |
| MYSQLDUMP="/usr/bin/mysqldump" | |
| MYSQL="/usr/bin/mysql" |
| # do it once | |
| seq 1 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
| # do it twice | |
| seq 2 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
| # do it 4 times, but at 2 a time | |
| seq 4 | parallel -n0 -j2 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
| # you can also put all your commands into a file |
| <?php | |
| /** | |
| * Pull script example from production to my local Bedrock/Vagrant environment | |
| * Requires PHP Deployer 3 | |
| * | |
| * Andreas Ek, 2015-04-23 | |
| */ | |
| date_default_timezone_set( 'Europe/Stockholm' ); |
| <script language="JavaScript" type="text/javascript"> | |
| // Comcast Cable Communications, LLC Proprietary. Copyright 2012. | |
| // Intended use is to display browser notifications for critical and time sensitive alerts. | |
| var SYS_URL='/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do'; | |
| // var image_url='http://servicealerts.comcast.net:8080/images/mt'; | |
| var image_url='http://xfinity.comcast.net/constantguard/BotAssistance/notice/images'; | |
| var headertext1='<strong>Comcast Courtesy Notice</strong>'; | |
| var textline1='You have reached 90% of your <b>monthly data usage allowance</b>.'; | |
| var textline2='Please sign in for more information and to remove this alert.'; | |
| var acknowledgebutton='<a href=\"#\" onClick="document.location.href=\''+SYS_URL+'?dispatch=redirect&redirectName=login¶mName=bmUid\'" title="Sign in to acknowledge" style="color: #FFFFFF;"><img alt="Sign in to acknowledge" src="'+image_url+'/mt_signin.png"/></a>'; |