Skip to content

Instantly share code, notes, and snippets.

View jmcmaster's full-sized avatar

Jason McMaster jmcmaster

View GitHub Profile
@jmcmaster
jmcmaster / react-native-flastlist-to-sectionlist-data.html
Last active August 7, 2023 16:42
Simple algorithm to convert React Native FlatList data to SectionList data
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script>
<script>
moment.locale();
const data = [
{
datetime: "2018-01-03T13:07:46+00:00",
name: "breakfast"
},
{
@jmcmaster
jmcmaster / category.php
Created March 9, 2016 16:34
This is a fix for newer versions of Wordpress when you try to use pagination on a category page and /page/2/ returns a 404 page
<!-- Add paginate_links() to your category.php file -->
<?php if ( have_posts() ) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php endwhile; ?>
<?php echo paginate_links( $args ); ?>
<?php endif; ?>
Fix for HHVM not playing nice with composer:
Add this as an alias (add to ~/.bashrc and `source ~/.bashrc`):
`alias composer="hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 /usr/local/bin/composer”`