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
const unsortedString = ` | |
a | |
c | |
b | |
` | |
const sortedString = [...unsortedString.split('\n')] | |
.map(x => x.trim()) | |
.filter(x => x) | |
.sort() | |
.join('\n') |
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 | |
# ANvänds = ./diff.sh swift-modularity/ Modularity/ "*.php" "." | |
DIR_1="$1" | |
DIR_2="$2" | |
GLOB="$3" | |
WHERE="$4" | |
cd $DIR_1 |
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
#!/usr/bin/env bash | |
#export | |
wp db export - | openssl smime --encrypt --text --binary --aes256 --outform DER --out database.sql.enc PATH_TO_PUBLIC_KEY | |
#import | |
openssl smime --decrypt --in database.sql.enc --binary --inform DER --inkey PATH_TO_PRIVATE_KEY | wp db import - |
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
<IfModule mod_rewrite.c> | |
# Get images from livesite if not on local | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www.LOCALSITE.com$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*\.(gif|jpg|png))$ https://www.THELIVESITE.com/$1 [R=301,L] | |
# Wordpress permalinks |
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
<?php | |
echo "test"; | |
?> |
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
var test = function () { | |
return "TEST!"; | |
} |
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
var test = function () { | |
return "TEST!"; | |
} |
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
// test |