Skip to content

Instantly share code, notes, and snippets.

View PhouvanhKCSV's full-sized avatar
🌴
On vacation

Phouvanh KCSV PhouvanhKCSV

🌴
On vacation
View GitHub Profile
@PhouvanhKCSV
PhouvanhKCSV / index.sh
Created March 26, 2018 05:35 — forked from max-mapper/index.sh
generate ES512 and RS256 elliptic curve keypairs for JWT JWK (JSON Web Token JSON Web Key) using openssl
# RS256
# private key
openssl genrsa -out rs256-4096-private.rsa 4096
# public key
openssl rsa -in rs256-4096-private.rsa -pubout > rs256-4096-public.pem
# ES512
# private key
openssl ecparam -genkey -name secp521r1 -noout -out ecdsa-p521-private.pem
# public key
@GhazanfarMir
GhazanfarMir / Instructions.sh
Last active May 14, 2024 03:26
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@chronon
chronon / ext.txt
Created February 18, 2017 15:38
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@jenky
jenky / .php_cs
Last active July 12, 2018 08:18
Laravel PHP-CS-Fixer 2 config
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('bootstrap/cache')
->exclude('storage')
->exclude('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
@UltimateWoo
UltimateWoo / active-woocommerce-subscription.php
Created December 28, 2015 22:33
Check if the current user has an active WooCommerce subscription
<?php
/**
* Check if the current user has an active subscription.
* Redirect the user if no active subscription and the current post is a singule forum.
* This code should not be copied and pasted as is. It is only to demonstrate the wcs_user_has_subscription() function.
*
* wcs_user_has_subscription( $user_id = 0, $product_id = '', $status = 'any' )
* @param int (optional) The ID of a user in the store. If left empty, the current user's ID will be used.
* @param int (optional) The ID of a product in the store. If left empty, the function will see if the user has any subscription.
@mulhoon
mulhoon / Highcharts Cheat Sheet
Last active March 22, 2023 18:43
Highcharts Cheat Sheet
$('#container').highcharts({
chart: {
alignTicks: true, // When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks.
animation: true, // Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here.
backgroundColor: '#FFF', // The background color or gradient for the outer chart area.
borderColor: '#4572A7', // The color of the outer chart border.
borderRadius: 5, // The corner radius of the outer chart border. In export, the radius defaults to 0. Defaults to 5.
borderWidth: 0, // The pixel width of the outer chart border.
className: null, // A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.
defaultSeriesType: 'line', // Alias of type.