Skip to content

Instantly share code, notes, and snippets.

View inawrath's full-sized avatar

Iván Nawrath Castillo inawrath

View GitHub Profile
@inawrath
inawrath / open-tab.js
Created September 29, 2020 02:06
Open Tab in iOS Safari with JavaScript vanilla
const loadingPage = `
<style>
/*Huge thanks to @tobiasahlin at http://tobiasahlin.com/spinkit/ */
.spinner {
margin: 100px auto 0;
width: 70px;
text-align: center;
}
.spinner > div {
@inawrath
inawrath / Problem homebrew bigsur.md
Last active November 19, 2020 14:27
Problem homebrew bigsur
  1. Install Tools Xcode
  2. Run in terminal sudo xcode-select --switch /Library/Developer/CommandLineTools
  3. Profit

Alternative if first solution not working

  1. Download Xcode beta 12.3
  2. Install (double click)
  3. Run in terminal xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer
  4. Profit
@inawrath
inawrath / deploy-django.md
Last active November 6, 2021 04:11 — forked from rmiyazaki6499/deploy-django.md
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
@inawrath
inawrath / create_user_in_postgresql.sql
Created September 11, 2023 12:40
Command to create a user in the PostgreSQL database and grant permissions only to a specific table
create user username with encrypted password 'password_to_user';
-- Permissions
GRANT SELECT ON TABLE database.public.table_db TO username;
@inawrath
inawrath / L3250_Reset.py
Created February 23, 2024 21:33 — forked from Bloody-Badboy/L3250_Reset.py
EPSON L3250 Series Waste Ink Counter Reset Using SNMP Protocol (Remove Service Required)
import re
from easysnmp import Session
from pprint import pprint
from struct import pack, unpack
printer_ip = "10.0.0.222"
session = Session(hostname=printer_ip, community="public", version=1, timeout=1)
password = [74, 54]