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
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
const webpack = require("webpack"); | |
module.exports = { | |
entry: "./src/index.js", | |
mode: "development", | |
target: "web", | |
devServer: { | |
historyApiFallback: true, | |
}, |
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
af Afrikaans | |
sq Albanian | |
ar Arabic | |
az Azerbaijani | |
eu Basque | |
bn Bengali | |
be Belarusian | |
bg Bulgarian | |
ca Catalan | |
zh-CN Chinese Simplified |
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
AuthType Basic | |
AuthName "WordPress Protected Area" | |
AuthUserFile /path/to/admin/passwords | |
Require valid-user | |
<Files admin-ajax.php> | |
Order allow,deny | |
Allow from all | |
Satisfy any | |
</Files> | |
<Files "\.(css|gif|png|js)$"> |
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
[ec2-user ~]$ lsblk | |
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
xvdf 202:80 0 100G 0 disk | |
xvda1 202:1 0 8G 0 disk / | |
The output of lsblk removes the /dev/ prefix from full device paths. In this example, /dev/xvda1 is mounted as the root device (note the MOUNTPOINT is listed as /, the root of the Linux file system hierarchy), and /dev/xvdf is attached, but it has not been mounted yet. | |
Determine whether you need to create a file system on the volume. New volumes are raw block devices, and you need to create a file system on them before you can mount and use them. Volumes that have been restored from snapshots likely have a file system on them already; if you create a new file system on top of an existing file system, the operation overwrites your data. Use the sudo file -s device command to list special information, such as file system type. | |
[ec2-user ~]$ sudo file -s /dev/xvdf | |
/dev/xvdf: data |
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
#in ~/bin create a file called vscode and give it execute permissions and copy the following: | |
#!/bin/bash | |
if [[ $# = 0 ]] | |
then | |
open -a "Visual Studio Code" | |
else | |
[[ $1 = /* ]] && F="$1" || F="$PWD/${1#./}" | |
open -a "Visual Studio Code" --args "$F" | |
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
<?php | |
include('wp/wp-load.php'); | |
class S3{ | |
private $bucket = 'bucket-cdn'; | |
private $directories = 'content/uploads/'; | |
private $sites = ''; | |
private $post_id = 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
<?php | |
/* Get instagram User ID */ | |
function get_instagram_id($username) { | |
$user_id = false; | |
if (!isset($username)) return false; | |
$username = str_replace('@', '', $username); | |
$access_token = '14319814.b082a92.c96b36393e574726ad08491ea64731ed'; | |
$url = "https://api.instagram.com/v1/users/search?q=" . $username . "&access_token=" . $access_token; |
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 | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
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
default_vcl add to vcl_recv func | |
if (req.restarts == 0) { | |
if (req.http.X-Forwarded-For) { | |
set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; | |
} else { | |
set req.http.X-Forwarded-For = client.ip; | |
} | |
} |
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 | |
USER="zend" | |
PASSWORD="" | |
#OUTPUT="/Users/rabino/DBs" | |
#rm "$OUTPUTDIR/*gz" > /dev/null 2>&1 | |
databases=`mysql -u $USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` |
NewerOlder