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
export const getThumbnail = (id, size = 300) => | |
`https://drive.google.com/thumbnail?id=${id}&sz=${size}`; | |
export const getIcon = (mimeType) => | |
`https://drive-thirdparty.googleusercontent.com/256/type/${mimeType}`; | |
export const getFile = (id) => `https://drive.google.com/uc?id=${id}`; | |
const downloadFile = (id) => |
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
The MIT License (MIT) | |
Copyright (c) 2015 Textalk | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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": "load-google-maps", | |
"version": "1.0.0", | |
"authors": ["Glenn Baker", "Gavin Foley", "Matteo Gaggiano"], | |
"description": "Load Google Maps API using jQuery Deferred.", | |
"main": "load-google-maps.js", | |
"keywords": ["Google Maps", "Async"], | |
"license": ["MIT", "GPL"], | |
"dependencies": { | |
"jquery": ">=1.5" |
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
/** | |
* A collection of helper prototype for everyday DOM traversal, manipulation, | |
* and event binding. Sort of a minimalist jQuery, mainly for demonstration | |
* purposes. MIT @ m3g4p0p | |
*/ | |
window.$ = (function (undefined) { | |
/** | |
* Duration constants | |
* @type {Object} |
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
//JS | |
var ajaxcontent = $('.products'); | |
$.ajax({ | |
type: 'POST', | |
url: window.wp_data.ajax_url, | |
data: { | |
action: "loadPosts", | |
}, | |
success: function (html) { |
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
add_action('init', 'apiSynchronization_activation'); | |
function apiSynchronization_activation(){ | |
if ( !wp_next_scheduled( 'apiSynchronization' ) ) { | |
wp_schedule_event( time(), 'twicedaily', 'apiSynchronization'); | |
} | |
} | |
add_action('apiSynchronization', 'apiSync', 100); | |
function apiSync() | |
{ |
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
//based on https://gist.github.com/pburtchaell/e702f441ba9b3f76f587 | |
//with added support for iphone 3 and 4 and orinetation support for iphone 5. | |
//this is for all devices which can run iOS7 in all orientations. | |
//not a mixin to avoid to much duplicate code when using on multiple selectors. | |
.selector { | |
$height: 70; //set your height in vh | |
$heightPercent: $height/100; | |
height: #{$height}vh; | |
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 | |
/* | |
1.- Create an App. | |
2.- Go to: https://developers.facebook.com/tools/explorer/ | |
+ Select your new created app on the right top. | |
+ Select "Get App Token" |