Skip to content

Instantly share code, notes, and snippets.

@mderazon
mderazon / export-to-csv.gs
Last active April 2, 2024 22:25
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@mbostock
mbostock / .block
Last active May 7, 2024 13:44
Radial Stacked Bar
license: gpl-3.0
height: 960
redirect: https://observablehq.com/@d3/d3-radial-stacked-bar-chart
@kevinweber
kevinweber / e.164.phoneNumber.js
Last active April 23, 2021 19:14
Convert string to match E.164 phone number pattern (e.g. +1234567890)
/**
* Convert string to match E.164 phone number pattern (e.g. +1234567890),
* otherwise return empty string.
*/
function enforcePhoneNumberPattern(string) {
let newString = string.match(/[0-9]{0,14}/g);
if (newString === null) {
return '';
}
@jagrosh
jagrosh / Growing A Discord Server.md
Last active February 17, 2024 04:29
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

Advanced JavaScript Learning Resources

This is a list of advanced JavaScript learning resources from people who responded to this [Tweet][13] and this [Tweet][20].

  • [You Don't Know JS][3]

  • [Frontend Masters courses by Kyle Simpson][12]

  • [@mpjme][6]'s [YouTube videos][5]

@samuel-fonseca
samuel-fonseca / bible_books_list.json
Created September 16, 2017 23:34
A JSON list of all the Bible books, the number of chapters, and the number of verses.
{
"books": [
{
"book": "Genesis",
"verses": 1533,
"chapters": 50
},
{
"book": "Exodus",
"verses": 1213,
@mrkrndvs
mrkrndvs / export-named-sheet-as-csv.gs
Last active May 4, 2024 21:53 — forked from mderazon/export-to-csv.gs
Google apps script to export an individual sheet as csv file
/*
* script to export data of the named sheet as an individual csv files
* sheet downloaded to Google Drive and then downloaded as a CSV file
* file named according to the name of the sheet
* original author: Michael Derazon (https://gist.github.com/mderazon/9655893)
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}];
@KrabCode
KrabCode / graph.pde
Last active September 29, 2021 11:59
graph.pde
float xRange = 160;
float yRange = 5.f;
float xDetail = 10;
float yDetail = 10;
float markerStroke = .8f;
float lineStroke = 1.f;
float plotLineStroke = 1f;
@iMerica
iMerica / index.js
Created December 28, 2018 21:18
Django/DRF File Uploading to S3
const notifyDjango = (url) => {
// Record the URL of the file you've uploaded along with any data
// that is relevent to you.
}
const uploadToS3 = (file, url) => {
// Upload the file here
// See https://git.io/fhIz5 as a great example of handling all S3 upload edge cases.
}