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| <?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' ); |
| /* | |
| * @Component() | |
| * class ThemedComponent { | |
| * @Inject() theme: ITheme; | |
| * } | |
| */ | |
| const theme = {foo: 'bar'}; | |
| export function Inject() { |
| #!/bin/bash | |
| # https://stackoverflow.com/a/21651707/9238321 | |
| for i in *.xlsx; do libreoffice --headless --convert-to csv "$i" ; done | |
| # https://unix.stackexchange.com/a/558965 | |
| awk '(NR == 1) || (FNR > 1)' *.csv > all.csv |
| Installing Kali Linux as a Windows 10 Subsystem for Linux | |
| Powershell (Admin) | |
| Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | |
| lxrun /install | |
| git clone https://github.com/RoliSoft/WSL-Distribution-Switcher.git | |
| cd WSL-Distribution-Switcher | |
| python get-prebuilt.py kalilinux/kali-linux-docker |
| #!/bin/sh | |
| # strict mode: error if commands fail or if unset variables are used | |
| set -eu | |
| if [ "$#" -lt 2 ] | |
| then | |
| echo Usage: `basename $0` "<limit> <command>..." | |
| echo or: `basename $0` "<memlimit> -s <swaplimit> <command>..." | |
| exit 1 |
| <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>'; |
| <!-- Goes into viewer.html just before ending </body> --> | |
| <script> | |
| let pinchZoomEnabled = false; | |
| function enablePinchZoom(pdfViewer) { | |
| let startX = 0, startY = 0; | |
| let initialPinchDistance = 0; | |
| let pinchScale = 1; | |
| const viewer = document.getElementById("viewer"); | |
| const container = document.getElementById("viewerContainer"); | |
| const reset = () => { startX = startY = initialPinchDistance = 0; pinchScale = 1; }; |
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndApply(event.request)) | |
| }) | |
| async function fetchAndApply(request) { | |
| let response = await fetch(request) | |
| let referer = request.headers.get('Referer') | |
| let contentType = response.headers.get('Content-Type') || '' | |
| if (referer && contentType.startsWith('image/')) { |
| #!/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" |