Skip to content

Instantly share code, notes, and snippets.

@StyxOfDynamite
StyxOfDynamite / 1_README.md
Created November 16, 2017 10:10 — forked from Daniel15/1_README.md
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

....'.....'..
. .,clloddxxkkdclOKXXNNNNNNNXKd, .'
.c,. ,d0WWWMMMMMMMMMMMMWWMMWMMMMMMMMNk; ;d'
:OOd' ,xNMMMWMMMMMMMMMMMMMMMWMMMMMMMMMMMMNd. . .cOX:
,0MKx; ,' :KWMMMMWMMMMMMMMMMXx0MMWWMMMMMMMMMMMMWO,:: .;xXWWl
.kMWNOl' cOcoNMMMMMMMMMMWWMMWN
@StyxOfDynamite
StyxOfDynamite / default.htm
Created December 21, 2018 13:08
pagination - twig
<!-- page 1 -->
{% if posts.currentPage == 1 %}
{% for page in posts.currentPage .. posts.currentPage + 3 %}
<li class="{{ posts.currentPage == page ? 'active' : null }}">
<a href="{{ this.page.baseFileName|page({ (pageParam): page }) }}">{{ page }}</a>
</li>
{% endfor %}
{% endif %}
<!-- page 2 -->
@StyxOfDynamite
StyxOfDynamite / StaticValetDriver.php
Last active June 9, 2020 15:31
Valet Driver - Serve Public Directory Files as Static Content
<?php
class StaticValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@StyxOfDynamite
StyxOfDynamite / phpunit.xml
Created December 2, 2021 09:46
Basic PHP unit config
<phpunit bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="ItemCollectionTest">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>