Skip to content

Instantly share code, notes, and snippets.

@ngabyn
ngabyn / moveToCalendar.gs
Created February 4, 2022 11:46 — forked from erickoledadevrel/moveToCalendar.gs
Moving events from one calendar to another, using Google Apps Script
/**
* Move events with a given title from your primary calendar to another calendar.
* You must enable the Calendar Advanced Service:
* https://developers.google.com/apps-script/guides/services/advanced#enabling_advanced_services
*/
function moveEvents(eventTitle, fromCalendarName, toCalendarName) {
var fromCalendarId = CalendarApp.getCalendarsByName(fromCalendarName)[0].getId();
var toCalendarId = CalendarApp.getCalendarsByName(toCalendarName)[0].getId();
var now = new Date();
// Auto-generated code. Do not edit.
namespace myTiles {
//% fixedInstance jres blockIdentity=images._tile
export const transparency16 = image.ofBuffer(hex``);
//% fixedInstance jres blockIdentity=images._tile
export const tile3 = image.ofBuffer(hex``);
//% fixedInstance jres blockIdentity=images._tile
export const tile4 = image.ofBuffer(hex``);
//% fixedInstance jres blockIdentity=images._tile
export const tile5 = image.ofBuffer(hex``);
function adaptDificulty () {
waves += 1
if (waves > 0 && waves <= 10) {
currentWaveSpeed = waveSpeed - waves
gameDifficulty = 3
} else if (waves > 10 && waves <= 20) {
currentWaveSpeed = waveSpeed - waves * 2
gameDifficulty = 2
} else {
currentWaveSpeed = 200
@ngabyn
ngabyn / functions.php
Created February 23, 2018 13:54 — forked from danieliser/functions.php
Fetch Active Install Count from WordPress Plugins API
<?php
function get_plugin_install_count( $plugin ) {
$api = plugins_api( 'plugin_information', array(
'slug' => 'popup-maker',
'fields' => array( 'active_installs' => true )
) );
if( ! is_wp_error( $api ) ) {
return $api->active_installs;
}