Skip to content

Instantly share code, notes, and snippets.

View morenoh149's full-sized avatar
💭
Working from 🛰

Harry Moreno morenoh149

💭
Working from 🛰
View GitHub Profile
@rmiyazaki6499
rmiyazaki6499 / deploy-django.md
Last active April 17, 2024 14:45
Deploying a Production ready Django app on AWS

Deploying a Production ready Django app on AWS

In this tutorial, I will be going over to how to deploy a Django app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app Hygge Homes (a vacation home rental app for searching and booking vacation homes based off Airbnb) and we wanted to share with other developers some of the lessons we learned along the way.

Following this tutorial, you will have an application that has:

  • An AWS EC2 server configured to host your application
  • SSL-certification with Certbot
  • A custom domain name
  • Continuous deployment with Github Actions/SSM Agent
@herrera-ignacio
herrera-ignacio / ec2-apache.sh
Created July 26, 2019 01:01
EC2 User data: install Apache web server for Amazon Linux 2 Image
#!/bin/bash
########################################
##### USE THIS WITH AMAZON LINUX 2 #####
########################################
# get admin privileges
sudo su
# install httpd (Linux 2 version)
@nadesh-git
nadesh-git / gist:908b9714f9c7f20b66dfb13b49ba346a
Created June 19, 2019 11:05
React native build issue - Androidx migration (June 2019)
Reference
https://developer.android.com/jetpack/androidx/migrate
android/build.gradle:
====================
buildscript {
ext {
googlePlayServicesVersion = "16.+"
firebaseVersion = "17.3.4"
@DesignByOnyx
DesignByOnyx / postgis-geojson-liaison.js
Created November 9, 2018 00:47
Helpful utility for converting postgis data into GeoJSON as it comes out of the db, and vice versa.
var wkx = require('wkx')
var pg = require('pg')
var pgUtil = require('pg/lib/utils')
const geoParser = {
init(knex){
// 1. Convert postgis data coming out of the db into geoJSON
// Every postgres installation will have different oids for postgis geo types.
knex
.raw('SELECT oid, typname AS name FROM pg_type WHERE typname IN (\'geography\', \'geometry\');')
@ngaller
ngaller / switchByProp.js
Last active March 26, 2018 21:43
transitionProps - a HOC to help build transitions with react-transition-group v2. Very nice with styled-components.
// build a switch function that examines a key/value collection based on an object literal,
// and return the first match
//
// Example usage:
// ```
// const result = switchBy({
// entering: 'A',
// entered: 'B',
// default: 'C'
// })(props)
@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

@morenoh149
morenoh149 / s3_constants.py
Last active April 25, 2017 21:15
Demonstrate how to fill and empty an existing s3 bucket.
S3_ACCESS_KEY = 'foo'
S3_SECRET_KEY = 'foo'
S3_BUCKET = 'foo'
@David-Guillot
David-Guillot / schemacrawler.sh
Created March 2, 2017 08:42
Make the SchemaCrawler shell script work from any working directory
DIR=$(dirname $(readlink -f "$0"))
java -cp $(echo $DIR/lib/*.jar | tr ' ' ':'):config schemacrawler.Main "$@"
@illume
illume / image_save.py
Created February 12, 2017 16:02
A tool for saving files to and from a postgresql db BYTEA table.
"""A tool for saving files to and from a postgresql db.
"""
import os
import sys
import argparse
import psycopg2
db_conn_str = "postgresql://username:password@localhost:5432/dbname"
create_table_stm = """
CREATE TABLE files (
@brigand
brigand / high-impact-redux-tests.md
Last active April 12, 2017 21:01
A guide to writing high impact redux tests.

Some people will tell you to test everything in your app. If you have time to kill, go for it. For most of us, we want to focus on tests that help us sleep at night. We'll be using jest in this guide, mostly because it provides snapshot testing.

mapDispatchToProps

This isn't something people normally test, but it saves us from typos that only show up in response to user interaction. Often we fail to dispatch all of the actions in our manual testing of UIs.

The premise here is simple, we want to know that all of our keys are actual functions. We'll be