Skip to content

Instantly share code, notes, and snippets.

View tonymtz's full-sized avatar
💻
Working From a Cafe

tonymtz tonymtz

💻
Working From a Cafe
View GitHub Profile
@tonymtz
tonymtz / class-based vs functional components.jsx
Created June 1, 2020 23:19
class-based vs functional components
// class-based component
class Text extends React.Component {
render() {
return <span>{this.props.children}</span>
}
}
// functional component
const Text = props => {
return <span>{props.children}</span>;
@tonymtz
tonymtz / composition over inheritance code example.jsx
Created June 1, 2020 23:16
Composition over inheritance code example
// Ugly way
const Text = () => {
// ... some implementation ...
}
class H1 extends Text {
// ... override some implementation ...
}
@tonymtz
tonymtz / PlayMusic.cs
Created September 24, 2019 03:34
Unity Audio Manager for Sfx and Music
using UnityEngine;
public class PlayMusic : PlaySfx {
[SerializeField] private bool repeat;
public override void Play() {
soundManagerController.PlaySfx(audioClip, volume);
}
void OnDestroy() {
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install postgresql-9.4

Goodies:

  1. zsh & oh-my-zsh
  2. zsh-autosuggestion & zsh-syntax-highlighting plugins. Add git and history
  3. docker-ce and docker-compose

Mandatory:

  1. Install rbenv and nodenv
  2. Ruby 2.5.3
  3. Node 12.16.1
  4. Install yarn

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by

Useful scripts for development.

Kill process listening a given port. I.e. 3500.

$ kill $(lsof -t -i :3500)

Aliases for HB.

alias godev='cd ~/workspace/homebase1'

PRIVACY POLICY SPELLCASTERS

PRIVACY POLICY MODEL FOR MOBILE APPLICATIONS

This privacy policy governs your use of the software application “Spellcasters” for mobile devices that was created by Gato Mocho. The Application is Madness Road – is the race for survival in the post-apocalyptic world.

What information does the Application obtain and how is it used?

User Provided Information

sudo systemctl enable gatomocho.service
sudo systemctl start gatomocho
sudo journalctl -f -u gatomocho
[Unit]
Description=Gatomocho service
ConditionPathExists=/home/ubuntu/work/src/gatomocho/main
After=network.target
[Service]
Type=simple
User=gatomocho
Group=gatomocho
LimitNOFILE=1024