create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
/** | |
* Sort array of objects based on another array | |
*/ | |
function mapOrder (array, order, key) { | |
array.sort( function (a, b) { | |
var A = a[key], B = b[key]; | |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
(function(global) { | |
var silpUrl = '//s3-eu-west-1.amazonaws.com/silp.shootitlive.com/js/silp.min.js'; | |
// Globals | |
if(!global.Silp) { global.Silp = {}; }; | |
var Silp = global.Silp; | |
// To keep track of which embeds we have already processed | |
if(!Silp.foundEls) Silp.foundEls = []; |
<?php | |
/** | |
* GitHub webhook handler template. | |
* | |
* @see https://docs.github.com/webhooks/ | |
* @author Miloslav Hůla (https://github.com/milo) | |
*/ | |
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check |
<?php | |
/** | |
* Get field key for field name. | |
* Will return first matched acf field key for a give field name. | |
* | |
* ACF somehow requires a field key, where a sane developer would prefer a human readable field name. | |
* http://www.advancedcustomfields.com/resources/update_field/#field_key-vs%20field_name | |
* | |
* This function will return the field_key of a certain field. |
<script data-version='v1' data-client-id='clients-id' id='unique-embedder-id' type='text/javascript'> | |
// "data-version": It's useful to put the version of your embedder script in the "version" data | |
// attribute. This will enable you to more easily debug if any issues arise. | |
// "data-client-id": This id allows us to pull up the correct client's settings from our database. | |
// Each client may have different settings associated with their widget, and you can load them | |
// with this! | |
// "id": This HTML id allows us to refer to this embedder script's location. This is helpful | |
// if you want to inject html code in specific places in hour hosts's website or if you want to | |
// insert your payload script right next to this in the <head> tag. | |
#!/bin/bash | |
PHP_VERSION=7.4.2 | |
# Command lines tools | |
xcode-select --install | |
# Install dependencies | |
brew install wget autoconf openssl lzlib curl imap-uw readline postgresql gettext libxslt libiconv bison pkg-config krb5 bzip2 openldap tidy-html5 | |
# Dirs |
I install some of the following software to help me debug and make it more secure.
sudo apt-get install fail2ban bwm-ng htop iotop iftop nethogs tcptrack
fail2ban - blocks failed logins for a number of services (a must for me) bwm-ng - bandwidth monitor (generally good to see the traffic on a server) htop - updated top command to see CPU/RAM/processes running (just nicer) iotop - see disk usage and the process (handy for checking problems)
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Aws\S3\S3Client; | |
use League\Flysystem\AwsS3v3\AwsS3Adapter; | |
use League\Flysystem\Filesystem; | |
use Storage; |
docker run -ti -v $(pwd):/tmp -w /tmp DOCKER_IMAGE /bin/bash |