Skip to content

Instantly share code, notes, and snippets.

View schlos's full-sized avatar

Miroslav schlos

View GitHub Profile
@schlos
schlos / README.md
Created June 2, 2015 14:26
No name

README is empty

@schlos
schlos / InsertDate.gs
Last active August 29, 2015 14:26 — forked from thomxc/InsertDate.gs
Google Docs Script Macro: Insert Date
/**
* The onOpen function runs automatically when the Google Docs document is
* opened. Use it to add custom menus to Google Docs that allow the user to run
* custom scripts. For more information, please consult the following two
* resources.
*
* Extending Google Docs developer guide:
* https://developers.google.com/apps-script/guides/docs
*
* Document service reference documentation:
@schlos
schlos / import_json_appsscript.js
Last active August 26, 2018 18:23 — forked from chrislkeller/import_json_appsscript.js
Adds what amounts to an =ImportJSON() function to a Google spreadsheet... To use go to Tools --> Script Editor and add the script and save. // Check out: https://github.com/bradjasper/ImportJSON for the latest version.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@schlos
schlos / MailinatorAliases
Created October 20, 2015 07:40 — forked from nocturnalgeek/MailinatorAliases
A list of alternate domains that point to @mailinator.com
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com
@schlos
schlos / cf-ddns.sh
Created January 2, 2016 13:33 — forked from larrybolt/cf-ddns.sh
Automatically update your CloudFlare DNS record to the IP, Dynamic DNS for Cloudflare
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS
# Can retrieve cloudflare Domain id and list zone's, because, lazy
# Place at:
# /usr/local/bin/cf-ddns.sh
@schlos
schlos / cloudflare.php
Created January 3, 2016 13:29 — forked from gentlecat/cloudflare.php
CloudFlare DNS records updater
<?php
/**
* Settings
*/
define('API_KEY', $_GET['apikey']); // CloudFlare API key
define('USERNAME', '[email protected]'); // Email address used to login into CloudFlare
define('IP', getCurrentIP()); // Current IP address
echo 'Setting IP address to "' . IP . '"...<br />';

Keybase proof

I hereby claim:

  • I am schlos on github.
  • I am schlossy (https://keybase.io/schlossy) on keybase.
  • I have a public key ASBgfFRZjINgtFmiZf9e7WsFNzCFf23srdG_u6sxMAsgEQo

And finally, I am proving ownership of the github account by posting this as a gist.

function gmailAutoarchive() {
var delayDays = 2; // will only impact emails more than 48h old
var maxDate = new Date();
maxDate.setDate(maxDate.getDate()-delayDays); // what was the date at that time?
// Get all the threads labelled 'autoarchive'
var label = GmailApp.getUserLabelByName("autoarchive");
var threads = label.getThreads(0, 400);
@schlos
schlos / DelayGmail
Created June 16, 2017 14:47 — forked from donalod/DelayGmail
GoogleAppScript_DelayedEmail
function moveDelayedMessages() {
receiveEmails("Delayed Messages");
Utilities.sleep(60000);
reArchive();
}
// receiveEmails() will take all threads in labelname (Default: 'Delayed messages')
// and place them into the mailbox. The intent is for a delayed retrieval of
// messages when combined with a script timer.
function receiveEmails(labelName) {
@schlos
schlos / gmailDelayed.js
Created June 16, 2017 14:49 — forked from pawurb/gmailDelayed.js
Fighting email checking addiction ...
//TODO
//https://developers.google.com/apps-script/managing_triggers_programmatically
function moveDelayedMessages() {
receiveEmails("Delayed Messages");
}
// receiveEmails() will take all threads in labelname (Default: 'Delayed messages')
// and place them into the mailbox. The intent is for a delayed retrieval of