Contents:
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
'use strict'; | |
// ---------------------------------------------------------------------------- | |
// Base Paths | |
// ---------------------------------------------------------------------------- | |
var config = { | |
projectName: 'Proj', | |
browserSync: true, | |
basePath: { |
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 // add everything except for this opening line to your functions file | |
add_filter( 'wp_nav_menu_items', 'sp_add_loginout_link', 10, 2 ); | |
function sp_add_loginout_link( $items, $args ) { | |
// Change 'primary' to 'secondary' to put the login link in your secondary nav bar. | |
if ( $args->theme_location != 'primary' ) { | |
return $items; | |
} | |
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
/*jshint strict:true, es5:true, forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, strict:true, undef:true, unused:true, nonew:true, browser:true, devel:true, indent:2, boss:true, curly:false, immed:false, latedef:true, newcap:true, plusplus:false, trailing:true, maxparams:4, maxerr:100, debug:false, asi:false, evil:false, expr:true, eqnull:false, esnext:false, funcscope:false, globalstrict:false, loopfunc:false */ | |
(function(pageWidth,pageHeight,px,py){ | |
"use strict"; | |
var prefix='', | |
iv = 0, | |
vendors = {Webkit: 'webkit', Moz: '', O: 'o', ms: 'MS' }, | |
testEl = document.createElement('div'), | |
each = function(elements, callback){ | |
for (var key in elements) | |
if (callback.call(elements[key], key, elements[key]) === false) return elements; |
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
/** | |
* @param {Event} evt | |
* @return {Object} | |
*/ | |
function getMousePosition(evt) { | |
var pageX = evt.pageX; | |
var pageY = evt.pageY; | |
if (pageX === undefined) { | |
pageX = evt.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; |
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
'use strict'; | |
// ======================================================================= | |
// Gulp Plugins | |
// ======================================================================= | |
var gulp = require('gulp'), | |
nunjucks = require('nunjucks'), | |
markdown = require('nunjucks-markdown'), | |
marked = require('marked'), | |
rename = require('gulp-rename'), | |
gulpnunjucks = require('gulp-nunjucks'); |
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
let sources = { | |
'default-src': ['\'self\''], | |
'script-src': ['\'self\'','https://*.myexternalcdn.com'], | |
'frame-src': ['https://someexternalframesource.com'], | |
'img-src': ['\'self\'', 'https:', 'data:'], | |
'style-src': ['\'self\'', 'https:'], | |
'font-src': ['\'self\'', 'https:'], | |
'connect-src': ['\'self\''], | |
} |
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 echo paginate_links( $args ); ?> | |
<!--OR--> | |
<?php | |
//custom paginaiton with styling from bootstrap | |
function custom_pagination() { | |
global $wp_query; | |
$big = 999999999; // need an unlikely integer | |
$pages = paginate_links( array( | |
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), |
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 CrossfadeSample = {playing:false}; | |
CrossfadeSample.play = function() { | |
// Create two sources. | |
this.ctl1 = createSource(BUFFERS.drums); | |
this.ctl2 = createSource(BUFFERS.organ); | |
// Mute the second source. | |
this.ctl1.gainNode.gain.value = 0; | |
// Start playback in a loop | |
if (!this.ctl1.source.start) { |
This list has been superseded by Public APIs. Check there for APIs with Auth: No
, HTTPS
and CORS
Yes
.
List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.
- 3taps (information)
- Adobe Creative SDK (image editing)
- App.net
- Bing Maps
OlderNewer