Skip to content

Instantly share code, notes, and snippets.

Michael DeRazon mderazon

Block or report user

Report or block mderazon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mderazon / get-dmarc-reports.js
Created Nov 22, 2017
Downloads all DMARC reports from Postmark in XML format
View get-dmarc-reports.js
const req = require('superagent');
const writeFile = require('util').promisify(require('fs').writeFile);
const apiToken = process.env.API_TOKEN;
const baseUrl = '';
(async function() {
const reports = [];
// get a list of all reports by id and create time
mderazon / copy-clip.js
Created Sep 27, 2017
View copy-clip.js
var link = '';
var textArea = document.createElement('textarea'); = 'fixed'; = 0; = 0; = '2em'; = '2em';
mderazon / .travis.yml
Last active Jul 16, 2018
Automatic deployment to Google Cloud Functions with Travis-ci
View .travis.yml
# Use Dockerized infrastructure
sudo: false
# Use node_js environnement
language: node_js
- "6"
# Cache Gcloud SDK between commands
mderazon /
Last active Feb 5, 2017 — forked from oscarb/
Formula to check if website in cell A1 in a Google Spreadsheet is up, using the W3C HTML Checker API

Validate URL in a Google Spreadsheet

Formula to check if URL in cell A1 in a Google Spreadsheet is up, using the W3C HTML Checker API


=IF(A1<>"",IF(ISERROR(FIND("non-document-error", INDEX(IMPORTDATA("" & A1),0,2))),"✓","✗"),"")


mderazon /
Created Nov 1, 2016
convert images and videos screenshots to something that's nice to paste in github
if [[ "$1" == *.mp4 ]]
/Users/me/bin/togif "$1"
if [[ "$1" == *.png ]]
/Users/me/bin/topic "$1"
mderazon /
Created May 25, 2016
get a bunch of youtube videos as mp3
youtube-dl -f 140 --ffmpeg-location /usr/local/bin/ffmpeg [list of youtube urls]
for f in *.m4a; do ffmpeg -i "$f" -acodec libmp3lame -ab 128k "${f%.m4a}.mp3"; done
View upload-file-server.js
var express = require('express')
var multer = require('multer')
var storage = multer.memoryStorage()
var upload = multer({ storage: storage })
var app = express()'/upload', upload.single('users.csv'), function (req, res, next) {
if (!req.file) {
View upload-file-client.jsx
import React from 'react'
import classNames from 'classnames'
import request from 'superagent'
export default class FileUploader extends React.Component {
constructor (props) {
this.state = {
fileName: '',
mderazon /
Last active Aug 29, 2015
automatically create a tag for package version bump
# file: .git/config
# this pushes every branch that's already there, plus tags. It does not force push, and it does not push branch that we didn't push manually.
[remote "origin"] # or whatever it is named
url = ...
push = :
push = +refs/tags/*:refs/tags/*
mderazon /
Last active Aug 29, 2015
fav node modules
npm install -g trash mocha gulp nodemon iojs-dep-check
You can’t perform that action at this time.