Skip to content

Instantly share code, notes, and snippets.

View kazuma1989's full-sized avatar
🦐

Kazuma Ebina kazuma1989

🦐
View GitHub Profile

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
@carcinocron
carcinocron / debugger pause beforeunload
Last active July 10, 2024 08:48
Chrome: pause before redirect
// Run this in the F12 javascript console in chrome
// if a redirect happens, the page will pause
// this helps because chrome's network tab's
// "preserve log" seems to technically preserve the log
// but you can't actually LOOK at it...
// also the "replay xhr" feature does not work after reload
// even if you "preserve log".
window.addEventListener("beforeunload", function() { debugger; }, false)
@jeyj0
jeyj0 / AssertAll.java
Last active August 23, 2022 11:32
JUnit5-like assertAll for JUnit4
public class AssertAll {
@Rule
public ErrorCollector collector = new ErrorCollector();
private void assertAll(Runnable... assertions) {
Arrays.stream(assertions).forEach(this::runAndCollectThrowable);
}
private void runAndCollectThrowable(Runnable runnable) {
@kazuma1989
kazuma1989 / nonNull.ts
Created February 27, 2020 02:49
Non-null filter
/**
* 値が null または undefined のときは false, それ以外の値のときは true を返す。
* Array.prototype.filter と組み合わせて null を除去するのに使える。
*
* @param value null チェックしたい値
* @example
* [0, null, {}].filter(nonNull) // [0, {}]
*/
export function nonNull<T>(value: T | null | undefined): value is T {
return value !== null && value !== undefined
@kazuma1989
kazuma1989 / .prettierrc
Last active April 5, 2020 09:13
よく使うprettierrc, tsconfig
{
"endOfLine": "lf",
"semi": false,
"singleQuote": true,
"trailingComma": "all"
}
@khalidx
khalidx / npm-script-globstar.md
Last active April 22, 2024 20:12
Fixing the issue with globstar paths (**/*) not working when running an npm script.

🚧 Issue Description

If you've ever run a script like npm run test from your package.json:

{
  "scripts": {
    "test": "node --test src/**/*.test.js"
  }
}