Skip to content

Instantly share code, notes, and snippets.

View paulpwo's full-sized avatar

Paul Osinga paulpwo

View GitHub Profile
@paulpwo
paulpwo / alacritty_nerd_font.sh
Last active February 19, 2023 20:10
Usando Alacritty en Mac M1 como sustituro de iTerm (https://alacritty.org/)
# INSTALL NERD FONT
# FROM : https://gist.github.com/davidteren/898f2dcccd42d9f8680ec69a3a5d350e
brew tap homebrew/cask-fonts && brew install --cask font-hack-nerd-font
brew install --cask alacritty
# CREATE CONFIGURATION YML
vim ~/.config/alacritty/alacritty.yml
@Minionguyjpro
Minionguyjpro / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Last active June 16, 2024 09:50
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

@paulpwo
paulpwo / gist:e2f839a8736965d67af0bf8ca75511da
Last active June 13, 2021 20:14
Django | Migrar SQLite y postgres

**Step 1:

Make a backup of your project (It does not hurt to prevent any eventuality)

**Step 2:

Run a data export. Directly Django provides the mechanism. The method that did not give me problems was the following:

python manage.py dumpdata --natural-foreign --natural-primary --format = xml --indent = 2> fixture.xml
@nginx-gists
nginx-gists / ubuntu_install.sh
Last active May 31, 2024 10:15
Automating Installation of WordPress with NGINX Unit on Ubuntu
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ];then
>&2 echo "This script requires root level access to run"
exit 1
fi
if [ -z "${WORDPRESS_DB_PASSWORD}" ]; then
>&2 echo "WORDPRESS_DB_PASSWORD must be set"
>&2 echo "Here is a random one that you can paste:"
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import 'package:image/image.dart' as ui;
void main() => runApp(MyApp());
@rmiyazaki6499
rmiyazaki6499 / deploy-django.md
Last active May 8, 2024 08:00
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
@paulpwo
paulpwo / posbox.sh
Created January 30, 2020 20:22
posbox.sh
#!/usr/bin/env bash
PKGS_TO_INSTALL="cups adduser postgresql-client python python-dateutil python-decorator python-docutils python-feedparser python-imaging python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-passlib python-psutil python-psycopg2 python-babel python-pychart python-pydot python-pyparsing python-pypdf2 python-reportlab python-requests python-tz python-vatnumber python-vobject python-werkzeug python-xlwt python-yaml postgresql python-gevent python-serial python-pip python-dev localepurge vim mc mg screen iw hostapd isc-dhcp-server git rsync console-data"
apt-get -y install ${PKGS_TO_INSTALL}
adduser pi -s /sbin/nologin -p 'raspberry'
cd /home/pi
git clone -b 12.0 --no-checkout --depth 1 https://github.com/odoo/odoo.git
cd odoo
@CHBresser
CHBresser / compress_s3_images.py
Last active August 1, 2022 13:34
Compress S3 Images using Boto3
import sys, botocore
import boto3
from io import BytesIO
from PIL import Image as pil
def start_compressing(dry_run=False):
s3 = boto3.resource('s3')
bucket = s3.Bucket('mybucketname')
exists = True
@nrollr
nrollr / MongoDB_macOS_Sierra.md
Last active April 1, 2024 16:23
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@ademar111190
ademar111190 / firebase.sh
Created June 22, 2016 17:51
A script to send data notifications
#!/bin/bash
# https://github.com/firebase/firebase-tools
# https://firebase.google.com/docs/cloud-messaging/server
DEVICE="<< DEVICE TOKEN >>"
KEY="<< SERVER KEY>>"
JSON="
{
\"to\": \"$DEVICE\",