Skip to content

Instantly share code, notes, and snippets.

View jacobjzhang's full-sized avatar

Jake Zhang jacobjzhang

View GitHub Profile
#!/usr/bin/env python
import math
import sys
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb)
# Assumes x1 < x2, y1 < y2

Dropping Migration Table, Models, Controller

Command Line

1. Drop Table/Migration

rails generate migration DropTablename

A file will be created, in the db > migrate folder, make sure it looks like:

Dropping Migration Table, Models, Controller

Command Line

1. Drop Table/Migration

rails generate migration DropTablename

A file will be created, in the db > migrate folder, make sure it looks like:

@jacobjzhang
jacobjzhang / index.js
Created March 23, 2020 02:20 — forked from codediodeio/index.js
Integrate Twilio with Firebase Cloud Functions
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
const twilio = require('twilio');
const accountSid = functions.config().twilio.sid
const authToken = functions.config().twilio.token
const client = new twilio(accountSid, authToken);