This file contains hidden or 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
# Set the Google Auth parameters. Fill in your RefreshToken, ClientID, and ClientSecret | |
$params = @{ | |
Uri = 'https://accounts.google.com/o/oauth2/token' | |
Body = @( | |
"refresh_token=$RefreshToken", # Replace $RefreshToken with your refresh token | |
"client_id=$ClientID", # Replace $ClientID with your client ID | |
"client_secret=$ClientSecret", # Replace $ClientSecret with your client secret | |
"grant_type=refresh_token" | |
) -join '&' | |
Method = 'Post' |
This file contains hidden or 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
[ | |
{ | |
"ID_0": "Centre", | |
"COUNTRY": "", | |
"NAME_1": "Blitta", | |
"NL_NAME_1": "", | |
"NAME_2": "TGO.1.1.1_1", | |
"NL_NAME_2": "Agbandi", | |
"ID_3": "", | |
"NAME_3": "", |
This file contains hidden or 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(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' |
This file contains hidden or 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
// get the content | |
@ob_start(); | |
$writer = PHPExcel_IOFactory::createWriter($excel, "Excel2007"); | |
$writer->save("php://output"); | |
$data = @ob_get_contents(); | |
@ob_end_clean(); | |
// set email attachment |
This file contains hidden or 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 fs = require('fs'); | |
var request = require('request'); | |
var EventEmitter = require('events').EventEmitter; | |
var mime = require('mime'); | |
var util = require('util'); | |
function resumableUpload() { | |
this.byteCount = 0; //init variables | |
this.tokens = {}; | |
this.filepath = ''; |
This file contains hidden or 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
// Colors reference | |
// You can use the following as so: | |
// console.log(colorCode, data); | |
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`); | |
// | |
// ... and so on. | |
export const reset = "\x1b[0m" | |
export const bright = "\x1b[1m" | |
export const dim = "\x1b[2m" |
This file contains hidden or 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 | |
/* | |
* class.couchdb.php - A class for easy use of CouchDB databases in PHP | |
* | |
* Copyright (C) 2012 Patrick "p2k" Schneider <[email protected]> | |
* | |
* This is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |