Skip to content

Instantly share code, notes, and snippets.

View zenorocha's full-sized avatar

Zeno Rocha zenorocha

View GitHub Profile
BEGIN:VCALENDAR
VERSION:2.0
BEGIN:VEVENT
SUMMARY: Enterprise Ready Conf 2024
DTSTART:20241030T150000Z
DTEND:20241030T230000Z
DTSTAMP:20240918T223514Z
UID:1726698914713-EnterpriseReadyConf2024
DESCRIPTION:Bringing together product and engineering leaders shaping the future of enterprise SaaS.
@zenorocha
zenorocha / invite.ics
Last active September 19, 2024 15:28
Resend with iCal
BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
SUMMARY:Access-A-Ride Pickup
DTSTART;TZID=America/New_York:20130802T103400
DTEND;TZID=America/New_York:20130802T110400
LOCATION:1000 Broadway Ave.\, Brooklyn
DESCRIPTION: Access-A-Ride to 900 Jay St.\, Brooklyn
STATUS:CONFIRMED

Would it be possible to include an iCal file attachment to the Access-A-Ride advance notification emails with a 30 minute window from the specified pickup time (that is the window in which Access-A-Ride drivers need to arrive)?

For example: if my Access-A-Ride is supposed to pick me up at 10:34 am from 1000 Broadway Ave and then again at 8:00 pm from 900 Jay St., include a calendar event (a .ics file) that would look similar to the following, attached to the advance trip notification:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
SUMMARY:Access-A-Ride Pickup
// Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e
// by @levelsio
// HOW TO
// 1) Make a Google Sheet, we'll pull the first cell e.g. A1
// 2) Publish your Google Sheet, File -> Publish To Web
// 3) Copy the SHEET_ID in the URL, put it in here below:
const endpoint = "https://spreadsheets.google.com/feeds/cells/1RKJ65dTptKlXQ4E6JbGEVLrK6lC9pZnEvkzn68twckA/1/public/full?alt=json"
// 4) Install Scriptable @ https://apps.apple.com/us/app/scriptable/id1405459188
// 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc)
clone() {
git clone git@github.com:$1/$2.git
}
@zenorocha
zenorocha / etc-hosts-on-win.md
Last active April 11, 2024 23:07
/etc/hosts on Windows

1. Get your IP Address

echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`

2. Modify your hosts file

notepad

@zenorocha
zenorocha / basic.md
Last active March 26, 2023 09:00
New Firebase Auth vs Old Firebase Auth
@zenorocha
zenorocha / query.sql
Last active April 8, 2018 02:01
Median Page Weight ~ BigQuery
SELECT
NTH(50, quantiles(INTEGER(bytesHtml/1024)))
+ NTH(50, quantiles(INTEGER(bytesHtmlDoc/1024)))
as html,
NTH(50, quantiles(INTEGER(bytesCSS/1024)))
as css,
NTH(50, quantiles(INTEGER(bytesJS/1024)))
@zenorocha
zenorocha / interview.md
Last active April 8, 2018 02:01
Interview for "The Open Sourcer"
You've written in the past about the importance of talks for open source projects' adoption. How would you recommend a developer new to the community approach this?

Back in 2011, I was working with ActionScript but what I really wanted to do was HTML5. My father always said that if I wanted to learn something for real, I'd have to teach it. So I sent a proposal to speak about HTML5 at a free software forum in a very small city.

I didn't expect them to accept it but they did. I had no experience with HTML5 and had to give an entire presentation about it. I could have freaked out and give them some lame excuse for not to do it, but I put myself together and studied like crazy. Couple weeks later I gave the talk and survived to tell this story.

You see, most people think they should be experts in order to give a talk. That is just not true. Once you realize that every human being is different and we all have the capacity to teach something to someone else, you'll understand that you can do anything.

F

var searchInput = document.querySelector('#search-input');
searchInput.addEventListener('input', function() { // Triggers when a user writes something
Launchpad // Uses Launchpad API Client to make an AJAX request
.url('http://liferay.io/docs/search/all') // Points to the API URL where the data is stored
.search('*', 'prefix', searchInput.value) // Filters results based on what the user typed
.highlight('content') // Automatically highlights the words that matched our query
.get() // Specifies what kind of HTTP request are we going to make
.then(function(result) {
// Renders the result in the page