This file contains 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
<?php | |
// ***** Declare function that buids the post type | |
function add_post_type($name, $args = array() ) { | |
add_action('init',function() use($name, $args) { | |
// make post type name capitalized | |
$upper = ucwords($name); | |
// make name acceptable |
This file contains 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
$(function detectOrientation(){ | |
var notifier = document.getElementById('notifier'); | |
var body = $('body'); | |
// set body class to portrait | |
function setPortrait() { | |
// notifier.innerHTML="now in portrait mode"; | |
body.addClass('portrait').removeClass('landscape'); | |
console.log( 'now in portrait mode' ); |
This file contains 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
/* Grunt tasks for developing wordpress themes to suit George Ananda's workflow | |
Autoloads all grunt modules via matchdep | |
Configures Dev and Dist directory variables for use in tasks | |
Initializes Grunt : | |
Watch : Watch html, php, css, js, & img files - livereloads browser on change | |
Watch sass files - compiles into css with compass on change | |
Open : Opens dev url on browser | |
Compass : Compiles files on sass folder to css | |
*/ |
This file contains 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
{ | |
"name": "react-learn-redux", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"preinstall": "npm-check-updates -u", | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"dev": "webpack-dev-server --content-base src --inline --hot" | |
}, |
This file contains 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
var debug = process.env.NODE_ENV !== 'production'; | |
var webpack = require('webpack'); | |
module.exports = { | |
context : __dirname + '/src', | |
devtool : debug ? "inline-sourcemap" : null, | |
entry : './js/client.js', | |
module : { | |
loaders: [ |
This file contains 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
const exists = element => { | |
return document.querySelector(element) != null ? true : false; | |
} | |
export default exists; |
This file contains 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
{"lastUpload":"2019-11-20T16:26:37.250Z","extensionVersion":"v3.4.3"} |
This file contains 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
// | |
// NetworkIdentifier.swift | |
// networkIdentifier | |
// | |
// Created by George Ananda on 29/03/19. | |
// Copyright © 2019 George Ananda. All rights reserved. | |
// | |
import Foundation | |
import SystemConfiguration.CaptiveNetwork |
This file contains 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
// ... | |
CF.customerReady(() => { | |
const customer = CF.customer.get('code'); | |
const props = {customer: customer}; | |
const container = document.getelementById('container'); | |
const formElement = React.createElement(form, props) | |
ReactDOM.render(formElement, container); | |
}); |
This file contains 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
// ... | |
const raffleObject = { | |
product: product.handle, | |
variant: form.size, | |
timestamp, | |
identity_no: identityNo, | |
instagram_handle: instagramHandle, | |
phone, | |
}; | |
CF.customer.set('raffle', [raffleObject]); |
OlderNewer