Skip to content

Instantly share code, notes, and snippets.

@agustinustheo
agustinustheo / add-nginx-conf.sh
Created December 8, 2020 18:35
A shell script to add NGINX configurations automatically.
#!/bin/bash
conf_path="/etc/nginx/conf.d/$1.conf"
if [ -f "$conf_path" ]
then
conf_text=`cat $conf_path`
if [[ "$conf_text" == *"$2"* ]] || [[ "$conf_text" == *"localhost:$3"* ]]
then
echo "Proxy route or localhost port has been used, please manually reconfigure your Nginx configuration."
else
@agustinustheo
agustinustheo / mock_financial_data.csv
Last active December 10, 2023 05:30
Mock data for a financial data analysis dashboard.
Date Income Expenses NetIncome BudgetIncome ActualIncome BudgetExpenses ActualExpenses Salaries R&D Marketing Utilities Rent Equipment Software Hardware Consulting Office Supplies DiffIncome DiffExpenses
2022-01-01 281 218 63 284 281 221 218 41 24 45 43 22 35 2 2 2 2 3 3
2022-01-02 328 244 84 323 328 240 244 46 45 34 35 31 37 1 4 8 3 -5 -4
2022-01-03 266 223 43 269 266 222 223 31 49 38 30 22 40 2 6 1 4 3 -1
2022-01-04 287 226 61 279 287 229 226 43 47 31 48 21 26 5 1 3 1 -8 3
2022-01-05 307 214 93 309 307 217 214 48 37 40 23 34 20 1 3 4 4 2 3
2022-01-06 209 229 -20 197 209 226 229 48 23 29 49 39 26 3 6 5 1 -12 -3
2022-01-07 294 202 92 289 294 202 202 38 22 34 23 36 32 2 9 4 2 -5 0
2022-01-08 270 217 53 260 270 210 217 33 40 20 36 31 42 4 7 1 3 -10 -7
2022-01-09 255 209 46 256 255 214 209 43 33 32 36 21 35 2 3 1 3 1 5
@agustinustheo
agustinustheo / myriad_devnet_airdrop.logs.txt
Created October 26, 2023 17:09
Airdrop logs for Myriad Social Devnet
Retrieving eligible addresses...
Eligible addresses for airdrop: [
{
address: '5Cr4D7HLFubZUHnWSa2ErcTVqLGXDMcRRECPMJMUJu9euTfU',
balance: '40090304795001589023923',
networkId: 'myriad'
},
{
address: '5Di8z8iqwkg1uEz2zqEyJopif8HdVvPT3DCxmyJt8SkBQeFS',
balance: '1023969999999750000000',
@agustinustheo
agustinustheo / myriad-node-parachain.logs.txt
Created October 26, 2023 07:19
Myriad Social Parachain build logs.
~/work/myriad-node-parachain ~/work/myriad-node-parachain
Starting docker compose
Creating volume "myriad-node-parachain_data" with default driver
Building node
Step 1/32 : FROM paritytech/ci-linux:61d4fd50-20230713 AS chef
61d4fd50-20230713: Pulling from paritytech/ci-linux
9d21b12d5fab: Pull complete
94ec252bb138: Pull complete
935ba62d5fdf: Pull complete
Digest: sha256:dc9abf9e877c5bad94828245406dac8a186530e1ad6a1b5f2072e5e19e1f64b4
@agustinustheo
agustinustheo / add-ini-wsgi-conf.sh
Last active March 27, 2023 02:11
A shell script to add an ini and WSGI configuration file.
#!/bin/bash
home_path=$(pwd)
wsgi_path="$home_path/wsgi.py"
ini_path="$home_path/$1"
if [ -f "$ini_path" ]
then
echo "INI and WSGI files already exists, renewing files..."
rm "$wsgi_path"
@agustinustheo
agustinustheo / add-nginx-wsgi-conf.sh
Last active March 27, 2023 02:10
A shell script for generating a new NGINX configuration for WSGI.
#!/bin/bash
conf_path="/etc/nginx/sites-available/$1"
available_path="/etc/nginx/sites-enabled/$1"
home_path=$(pwd)
if [ -f "$conf_path" ]
then
echo "NGINX Configuration file already exists, renewing file..."
rm "$available_path"
@agustinustheo
agustinustheo / add-service.sh
Last active March 26, 2023 09:07
A shell script to add a new service for Flask App
#!/bin/bash
home_path=`pwd`
service_path="/etc/systemd/system/$1.service"
if [ -f "$service_path" ]
then
echo "Service file already exists, renewing file..."
systemctl stop $1.service
systemctl disable $1.service
rm "$service_path"
name: CI/CD Deploy Netlify Webapp
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
@agustinustheo
agustinustheo / deploy-react-web-using-netlify.yml
Created November 6, 2022 04:39
GH Actions to deploy React to Netlify
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.1
with:
publish-dir: './packages/react-webapp/build'
production-branch: main
github-token: ${{ secrets.MY_GITHUB_SECRET }}
deploy-message: "Deploy from GitHub Actions"
enable-pull-request-comment: false
enable-commit-comment: true
overwrites-pull-request-comment: true
@agustinustheo
agustinustheo / react-lerna-install-and-build.yml
Created November 6, 2022 04:27
GH Actions for Lerna and React
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Monorepo Code
uses: actions/checkout@v2
- name: Yarn Bootstrap
uses: borales/actions-yarn@v3.0.0
with:
cmd: bootstrap:ci # will run `yarn bootstrap:ci` command