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
$ npm install - production | |
$ ./bundle.sh |
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
$ git clone [email protected]:AWSinAction/apigateway.git | |
$ cd apigateway/ |
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
// A PHP pagination, based on this tutorial: https://code.tutsplus.com/tutorials/how-to-paginate-data-with-php--net-2928 | |
// Adjusted for own use, fixed some bugs (prev/next links did not stop counting after first or last page was reached) | |
function pagination($page, $total, $limit, $url) | |
{ | |
$links = 1; // links to show next to the current link, e.g. 1 = 3 links max. | |
$list_class = "paginate"; // classname for the pagination list | |
$limit = $limit ? $limit : 10; // posts per page | |
$page = $page ? $page : 1; // currentpage |
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
Empty file |
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
Empty file |
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
/*---------------------------------------------------- | |
* Slider, fancy nudgy hover effect | |
/*----------------------------------------------------*/ | |
function nudgeSlider(){ | |
const $slickNext = $('.slick-next'); | |
const $slickPrev = $('.slick-prev'); | |
const $slickTrack = $('.slick-track'); | |
$slickNext.add($slickPrev).each(function(){ | |
const $this = $(this); |
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
''' | |
Tailz | |
''' | |
class Empty: | |
def __init__(self): | |
self.isEmpty = True | |
class Node: | |
def __init__(self, value, tail): |
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
''' | |
Tic Tac Toe | |
A very (very) basic game in Python | |
''' | |
def tictactoe(): | |
#create an empty raster | |
def makeRaster(row, col): |
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
foreach( get_terms( 'product-categories', array( 'hide_empty' => false, 'parent' => 0 ) ) as $parent_term ) { | |
// display top level term name | |
echo $parent_term->name; | |
foreach( get_terms( 'product-categories', array( 'hide_empty' => false, 'parent' => $parent_term->term_id ) ) as $child_term ) { | |
// display name of all childs of the parent term | |
echo $child_term->name; | |
} | |
} |