Skip to content

Instantly share code, notes, and snippets.

@EdCornejo
EdCornejo / outbound-email-with-cloudflare.md
Created October 13, 2023 05:54 — forked from irazasyed/outbound-email-with-cloudflare.md
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@EdCornejo
EdCornejo / download-vimeo-video.js
Created September 19, 2022 22:40 — forked from dmlogv/download-vimeo-video.js
Download private embed Vimeo video
// Ctrl+Shift+C to open Chrome Console.
// Choose an IFrame of the Vimeo Video with a comment `player.vimeo.com`
// in the drop-down list `top`.
// Run a script:
var videos = [];
$$('script')[3].textContent.match(/\{[^{]+?mp4[^}]+?\}/g).forEach(
x => { o = JSON.parse(x);
videos.push(o);});
videos.sort((a, b) => a.quality.localeCompare(b.quality)).forEach(
@EdCornejo
EdCornejo / Populate Sheets With AdWords Data.js
Created October 4, 2017 09:02 — forked from siliconvallaeys/Populate Sheets With AdWords Data.js
Populate Google Sheet With Custom AdWords Data
/*
// AdWords Script: Put Data From AdWords Report In Google Sheets
// --------------------------------------------------------------
// Copyright 2017 Optmyzr Inc., All Rights Reserved
//
// This script takes a Google spreadsheet as input. Based on the column headers, data filters, and date range specified
// on this sheet, it will generate different reports.
//
// The goal is to let users create custom automatic reports with AdWords data that they can then include in an automated reporting
// tool like the one offered by Optmyzr.
@EdCornejo
EdCornejo / install-comodo-ssl-cert-for-nginx.rst
Created July 17, 2017 05:49 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@EdCornejo
EdCornejo / android_studio_shortcuts.md
Created July 6, 2017 05:50 — forked from stkent/android_studio_shortcuts.md
Android Studio Shortcuts (Mac)

Android Studio Shortcuts (Mac)

Notes:

  • Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
  • Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
  • A fairly complete shortcut list can be found here.

Useful symbols:

@EdCornejo
EdCornejo / gunicorn_start.bash
Created May 1, 2017 03:56 — forked from postrational/gunicorn_start.bash
Example of how to set up Django on Nginx with Gunicorn and supervisordhttp://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/
#!/bin/bash
NAME="hello_app" # Name of the application
DJANGODIR=/webapps/hello_django/hello # Django project directory
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket
USER=hello # the user to run as
GROUP=webapps # the group to run as
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name
@EdCornejo
EdCornejo / post-receive
Created February 9, 2017 05:19 — forked from cupnoodle/post-receive
Post receive with unicorn/nginx, deploy script
#!/bin/bash -l
#The -l parameter executes the command in a login shell
GIT_DIR=/home/rails/repo/fox_sample.git
WORK_TREE=/home/rails/fox_sample
while read oldrev newrev ref
do
@EdCornejo
EdCornejo / SaveManager.swift
Created January 24, 2017 18:59 — forked from cemolcay/SaveManager.swift
NSUserDefaults Save Manager
// MARK: - Manager
class SaveManager {
// MARK: Singleton
private static let instance = SaveManager()
class func sharedInstance () -> SaveManager {
@EdCornejo
EdCornejo / Git push deployment in 7 easy steps.md
Created January 11, 2017 06:04 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
#!/usr/bin/env python
import boto
BUCKET_NAME = "bucket-name"
DELETE_DATE = "2016-09-15"
counter = 0
bucket = boto.connect_s3().get_bucket(BUCKET_NAME)
for v in bucket.list_versions():