Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MervinPraison
MervinPraison / AIA003_tf_estimators.ipynb
Created June 20, 2019 10:44 — forked from yufengg/AIA003_tf_estimators.ipynb
Jupyter notebook for AI Adventures episode 3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MervinPraison
MervinPraison / densely-connected-networks.ipynb
Last active June 27, 2019 14:33
densely-connected-networks.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MervinPraison
MervinPraison / docker-compose.yml
Created June 4, 2019 15:00
Docker Compose WordPress MySQL
version: '3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
@MervinPraison
MervinPraison / docker-stack.yml
Last active September 19, 2022 14:28
Docker Stack WordPress phpmyadmin mysql
version: '2'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
@MervinPraison
MervinPraison / WordPress Custom Global Variables.md
Created July 18, 2018 10:17 — forked from aahan/WordPress Custom Global Variables.md
Creating and using custom global variables in wordpress.

First create global variables (in functions.php or as a mu-plugin):

<?php

/*
 * CUSTOM GLOBAL VARIABLES
 */
function wtnerd_global_vars() {
@MervinPraison
MervinPraison / custom-post-taxonomy-permalinks.php
Created June 30, 2018 06:28 — forked from kasparsd/custom-post-taxonomy-permalinks.php
Create permalink structure URLs for custom post types that include all parent terms from a custom taxonomy
<?php
/*
Term Archive Pages:
- http://example.com/recipes/dinner/
- http://example.com/recipes/breakfast,brunch/
Single Recipe Pages:
- http://example.com/recipes/dinner/soup-title/
@MervinPraison
MervinPraison / PHP Sort by Scripture (Bible)
Created June 19, 2018 09:55 — forked from dajare/PHP Sort by Scripture (Bible)
Comp function to sort PHP Array by Bible Verses (Scripture Books)
function scripturesort($a, $b) {
if ($a == $b) {return 0;}
$order=array("Genesis", "Exodus", "Leviticus", "Numbers", "Deuteronomy", "Joshua", "Judges", "Ruth", "1 Samuel", "2 Samuel", "1 Kings", "2 Kings", "1 Chronicles", "2 Chronicles", "Ezra", "Nehemiah", "Esther", "Job", "Psalm", "Proverbs", "Ecclesiastes", "Song of Solomon", "Isaiah", "Jeremiah", "Lamentations", "Ezekiel", "Daniel", "Hosea", "Joel", "Amos", "Obadiah", "Jonah", "Micah", "Nahum", "Habakkuk", "Zephaniah", "Haggai", "Zechariah", "Malachi", "Matthew", "Mark", "Luke", "John", "Acts", "Romans", "1 Corinthians", "2 Corinthians", "Galatians", "Ephesians", "Philippians", "Colossians", "1 Thessalonians", "2 Thessalonians", "1 Timothy", "2 Timothy", "Titus", "Philemon", "Hebrews", "James", "1 Peter", "2 Peter", "1 John", "2 John", "3 John", "Jude", "Revelation");
$fa = $a;
$fb = $b;
preg_match('/^..(.+?)\b/', $a, $matches);
$a = trim(substr($matches[0],0,4));
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MervinPraison
MervinPraison / gulpfile.js
Last active January 16, 2018 12:01
Gulpfile.js Example
var gulp = require('gulp'),
sass = require('gulp-sass');
var sassConfig = {
inputDirectory: 'resources/sass/**/*.scss',
outputDirectory: 'assets/css',
options: {
outputStyle: 'expanded'
}
}