Skip to content

Instantly share code, notes, and snippets.

View smartium's full-sized avatar

SMARTIUM smartium

View GitHub Profile
#!/bin/bash
# ./deploy.sh create --> create fly.io project
# ./deploy.sh --> only update project
if ! command -v flyctl &>/dev/null; then
echo "flyctl isn't installed! Opening fly.io installation instructions..."
sleep 3
open https://fly.io/docs/getting-started/installing-flyctl/
exit
#!/bin/bash
# ./deploy.sh create --> create Heroku project git init and npm init
# ./deploy.sh --> only update project
export CMMT_MSG="first commit" # commit message
if [ "$#" -eq "1" ]; then
if [ "$1" = "create" ]; then
# CREATE NPM PACKAGE AND HEROKU APP:

Fonte: https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Classes

Classes

Classes em JavaScript são introduzidas no ECMAScript 2015 e são simplificações da linguagem para as heranças baseadas nos protótipos. A sintaxe para classes não introduz um novo modelo de herança de orientação a objetos em JavaScript. Classes em JavaScript provêm uma maneira mais simples e clara de criar objetos e lidar com herança.

# System Dependencies: ffmpeg vlc
import RPi.GPIO as GPIO
import time
import os
import sys
from subprocess import Popen
GPIO.setmode(GPIO.BCM)
WebCamTexture webCamTexture;
WebCamDevice[] devices;
// List devices
devices = WebCamTexture.devices;
for (int i = 0; i < devices.Length; i++)
Debug.Log(devices[i].name);
// Configure WebCam
webCamTexture = new WebCamTexture(1280, 720, 30);
@smartium
smartium / tmux-cheatsheet.markdown
Created December 19, 2021 14:27 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
var array = COLLECTION.find().fetch();
var randomIndex = Math.floor( Math.random() * array.length );
var element = array[randomIndex];
@smartium
smartium / main.js
Last active December 2, 2021 19:29
import '../imports/both/lib/collections'
Meteor.startup(()=> {
if (DatabaseName.find().count() < 1) {
DatabaseName.insert({
pointer: 1,
updatedAt: new Date().valueOf()
})
console.log('[DatabaseName] CRIADO!')
}
@smartium
smartium / drag-and-spin-demo.markdown
Created October 25, 2021 06:02
Drag and Spin Demo