Skip to content

Instantly share code, notes, and snippets.

View amimaro's full-sized avatar

Amir Zahlan amimaro

View GitHub Profile
amimaro / tecno-brega-stack-setup.sql
Last active April 26, 2022 23:16
Remix tecno-brega-stack setup
View tecno-brega-stack-setup.sql
-- Create a table for Public Profiles
create table profiles (
id uuid references auth.users not null,
updated_at timestamp with time zone,
username text unique,
avatar_url text,
website text,
primary key (id),
amimaro /
Last active July 11, 2022 17:20
NPX useful commands list

NPX Commands List


npx http-server [path] [options]


npx create-react-app@latest <project-name>

amimaro /
Created May 17, 2021 10:54 — forked from bgromov/
Git: reset author for ALL commits
# Credits:
git filter-branch -f --env-filter "
amimaro / #_nginx.conf
Last active May 11, 2021 23:42
NGINX configuration to deploy (Angular application) on docker
View #_nginx.conf
events {}
http {
# Browser preferred language detection (does NOT require AcceptLanguageModule)
map $http_accept_language $accept_language {
~*^pt pt;
~*^en en;
amimaro / _beep
Last active August 29, 2020 23:44
Script to beep and/or notify after command finish at terminal
View _beep
# Save this script at ~/Scripts
# Add to the script folder to PATH at ~/.bashrc (export PATH="~/Scripts:$PATH")
# Don't forget to make this script executable, use: chmod +x _beep
# Install sox: apt install sox
# Use any audio file
# -q -V1 to use silent mode
amimaro / Array2MatrixIndex.js
Last active March 22, 2018 13:57
Convert Array Index into Matrix Index
View Array2MatrixIndex.js
let matrix = Array.from(Array(100).keys());
let rows = 10, columns = 10;
let getRow = (index, totalRows) => {
return Math.floor(index/totalRows);
let getColumn = (index, totalColumns) => {
return index % totalColumns;
amimaro / UnityHttpListener.cs
Last active December 18, 2023 12:31
Listen for Http Requests with Unity
View UnityHttpListener.cs
using UnityEngine;
using UnityEngine.Networking;
using System;
using System.IO;
using System.Net;
using System.Threading;
public class UnityHttpListener : MonoBehaviour
amimaro / UnityReadWriteFile.cs
Last active March 19, 2018 12:33
Read and Write files with Unity
View UnityReadWriteFile.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Text;
using System.IO;
public class UnityReadWriteFile : MonoBehaviour
void Start ()
amimaro / UnityHttpRequest.cs
Last active February 5, 2020 08:50
Unity Http Request Example
View UnityHttpRequest.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class UnityRequest : MonoBehaviour
bool display = false;
private GUIStyle guiStyle = new GUIStyle ();
public string uri = "http://localhost:8080";
amimaro / UnityDelay.cs
Created March 16, 2018 14:19
Unity Delay Function
View UnityDelay.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DelayTest : MonoBehaviour
bool display = false;
void Start ()