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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
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
<form name="checkoutform" action="/payment" method="POST"> | |
<input type="hidden" name="stripeToken" id="stripe_token" /> | |
</form> | |
<script src="https://checkout.stripe.com/checkout.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<button id="customButton" style="display:none;">Purchase</button> | |
<script> | |
var handler = StripeCheckout.configure({ |
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
## Step 1: Check System Architecture. | |
getconf LONG_BIT | |
uname -p | |
## Step 2: Download the latest version. current LTS release is 4.2.1. | |
wget https://nodejs.org/dist/v4.2.1/node-v4.2.1-linux-x64.tar.gz | |
## Step 3: Installing the downloaded binary | |
tar -C /usr/local --strip-components 1 -xzf node-v4.2.1-linux-x64.tar.gz |
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
When running any composer commands, sometimes you see the following error stack: | |
``` | |
[ReflectionException] | |
Class Fxp\Composer\AssetPlugin\Repository\NpmRepository does not exist | |
[ErrorException] |
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
When running composer commands, sometimes you may see Download exception errors, and also this error message: | |
``` | |
proc_open(): fork failed - Cannot allocate memory | |
``` | |
To correct this error, you need to enable swap. You can enable swap by running the following commands: | |
``` | |
/bin/dd if=/dev/zero of=/swapfile bs=1M count=4096 |
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
# Uncomment the following code to force https mode. | |
#server { | |
# listen 80; | |
# server_name laravel.test; | |
# return 301 https://laravel.test$request_uri; | |
#} | |
server { | |
listen 80; # comment this line & uncomment the line below to force https mode. |
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 | |
# Stop all containers | |
sudo docker stop $(sudo docker ps -a -q) | |
# Delete all containers | |
sudo docker rm $(sudo docker ps -a -q) | |
# Delete all images | |
sudo docker rmi $(sudo docker images -q) | |
# Deleta all volumes | |
sudo docker volume prune -f | |
# Delete docker networks |
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
sudo docker rmi --force $(sudo docker images -qa -f 'dangling=true') |
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
# Go to redis terminal using command 'redis-cli'. After redis terminal is opened, type in the following command to remove entries: | |
EVAL "local keys = redis.call('keys', ARGV[1]) \n for i=1,#keys,5000 do \n redis.call('del', unpack(keys, i, math.min(i+4999, #keys))) \n end \n return keys" 0 prefix:* |
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
1. First edit the mysql config e.g. /etc/mysql/my.cnf & added the following: | |
[mysqld] | |
default_authentication_plugin= mysql_native_password | |
2. Then run the following command: | |
mysql_upgrade -u root -p --default-auth=mysql_native_password | |
3. If above command succeeds, then login into mysql server: |
OlderNewer