Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@erickoledadevrel
erickoledadevrel / moveToCalendar.gs
Last active November 16, 2023 07:02
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();
@webcss
webcss / eventsmixin.js
Last active August 9, 2016 12:44
PubSub mixin using CustomEvents
// utilizes the browser eventsystem
// usefull in cases where you need communication between independent components
// registered events are automatically removed onunload with preserving any other onunload handler
var eventsMixin = function(target) {
var _subscriptions = [];
target.broadcast = function(type, payload) {
var ev = new CustomEvent(type, {
detail: payload,
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 9, 2023 22:47
React (Virtual) DOM Terminology
@staltz
staltz / introrx.md
Last active April 20, 2024 14:15
The introduction to Reactive Programming you've been missing
@blackfalcon
blackfalcon / git-feature-workflow.md
Last active April 13, 2024 07:33
Git basics - a general workflow

Git-workflow vs feature branching

When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc

@dolphin278
dolphin278 / README.md
Last active February 12, 2022 16:30
Pub/sub example for nodejs using mongodb

Uses capped collection, tailable cursors and streams.

What's here?

  • init.js recreates collection capped collection 'queue' on mongodb.
  • writer.js spams queue with new messages
  • worker.js processes all messages saved to queue,
  • onceWorker.js processes only unprocessed messages, so you can spawn several of them and each of your messages will be processed by only one worker.

Steps