Skip to content

Instantly share code, notes, and snippets.

View kenmasters's full-sized avatar

Ken John Siosan kenmasters

View GitHub Profile
@kenmasters
kenmasters / Postman POST PUT Requests.txt
Created March 21, 2021 15:21 — forked from ethanstenis/Postman POST PUT Requests.txt
How to make Postman work with POST/PUT requests in Laravel...
To make Postman work with POST/PUT requests...
https://laravel.com/docs/5.2/routing#csrf-x-csrf-token
In addition to checking for the CSRF token as a POST parameter, the Laravel VerifyCsrfToken middleware will also check for the X-CSRF-TOKEN request header.
1. Store the token in a "meta" tag at the top of your root view file (layouts/app.blade.php)...
<meta name="csrf-token" content="{{ csrf_token() }}">
** If using jQuery, you can now instruct it to include the token in all request headers.
$.ajaxSetup({
@kenmasters
kenmasters / Common-Currency.json
Created December 8, 2017 03:55 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@kenmasters
kenmasters / Using TWBS to WP
Last active December 7, 2017 02:04 — forked from mrbobbybryant/gist:83c4a076da6dd67de3da
Properly enqueue Bootstrap(CSS/JS) into WordPress CMS
<?php
/**
* Enqueue scripts and styles
*/
add_action( 'wp_enqueue_scripts', 'your_theme_enqueue_scripts' );
function your_theme_enqueue_scripts() {
// all styles
wp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.css', array(), 20141119 );
@kenmasters
kenmasters / parallax.js
Created February 25, 2016 03:33 — forked from srikat/parallax.js
Applying Parallax effect from Parallax Pro in any Genesis theme. http://sridharkatakam.com/apply-parallax-effect-parallax-pro-genesis-theme/
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'parallax-section-below-header',
'name' => __( 'Parallax Section Below Header', 'your-theme-slug' ),
'description' => __( 'This is the parallax section below header.', 'your-theme-slug' ),
) );
genesis_register_sidebar( array(
'id' => 'parallax-section-above-footer',
'name' => __( 'Parallax Section Above Footer', 'your-theme-slug' ),