Skip to content

Instantly share code, notes, and snippets.

Avatar
🥔
ポテト

Lauren Tan poteto

🥔
ポテト
View GitHub Profile
View sample-discord-coc.md

Lalassemble Code of Conduct

Welcome!

Lalassemble is a Discord server and linkshell community for the Aether datacenter in Final Fantasy XIV.

The current admins and mods are:

  • @milk#2755
@poteto
poteto / lauren-tan-speaking.md
Last active Aug 28, 2020
Looking for a speaker for your upcoming tech conference? I'm an engineering leader and software engineer at Netflix and have done >15 talks at small to large conferences. I'm interested in speaking about TypeScript, JavaScript, React, GraphQL, Elixir/Phoenix, Microservices, Engineering leadership and/or management
View lauren-tan-speaking.md
@poteto
poteto / mark-empty-as-busy.js
Created Feb 24, 2019
WIP: Create busy placeholders in GCal
View mark-empty-as-busy.js
function toDateRanges(items) {
return items
.filter(calEvent => {
return (
calEvent.start &&
calEvent.start.dateTime &&
calEvent.end &&
calEvent.end.dateTime
);
})
@poteto
poteto / generate-random-dates.js
Last active Feb 18, 2019
Quick and dirty script to generate some random dates. Copy/paste into your console, it will copy those dates into your clipboard.
View generate-random-dates.js
const COUNT = 32;
const START_DATE = new Date(2019, 0, 1);
const END_DATE = new Date(2019, 11, 31);
function randomDate(start, end) {
return new Date(
start.getTime() + Math.random() * (end.getTime() - start.getTime())
);
}
@poteto
poteto / gas_sheet_as_json.js
Created Mar 29, 2018 — forked from chrsstrm/gas_sheet_as_json.js
Treat a Google Sheet like a JSON API
View gas_sheet_as_json.js
/**
* create a Google Sheet then go to Tools > Script Editor
* Paste this code into the editor. Save.
* Publish > Deploy as Web App
* Set new version, publish as me, who has access - anyone, even anon.
* GET to the URL, add on end ?sheet=[sheet name]
* Sheet name is the sheet name, manage appropriately (no spaces or symbols to keep it simple)
* Request returns JSON representation of the sheet.
*/
@poteto
poteto / FBGroupMemberRemover.js
Last active Sep 11, 2019
Delete everyone from your Facebook group! Thanks for the dark UX, FB
View FBGroupMemberRemover.js
class FBGroupMemberRemover {
constructor() {
this.adminText = 'Admin';
this.removeMemberModalHeadingText = 'Remove Member';
this.memberElementSelector = '[data-name="GroupProfileGridItem"]';
this.memberContextMenuSelector = 'button[aria-label="Member Settings"]';
this.removeMemberButtonSelector = 'a[data-testid="leave_group"]'
this.removalOptions = {
View controllers.application.js
import Ember from 'ember';
import Changeset from '../lib/changeset';
import validatePresence from '../validators/presence';
let model = { foo: 'bar' };
let validations = {
foo: validatePresence()
};
let changeset = new Changeset(model, { validations });
View skeleton-5.js
import Ember from 'ember';
import QueryParams from 'ember-parachute';
export const AppQueryParams = new QueryParams({
query: {
as: 'q',
defaultValue: 'puppy',
refresh: true
}
});
View skeleton-4.hbs
{{#my-loader query=query as |loader|}}
{{#if loader.isRunning}}
<p>Loading...</p>
{{else}}
{{#each loader.data as |user|}}
{{user.fullName}}
{{/each}}
{{/if}}
{{/my-loader}}
View skeleton-3.hbs
{{yield (hash
isRunning=fetchData.isRunning
data=data)
}}