Skip to content

Instantly share code, notes, and snippets.

View g1ll's full-sized avatar
🇧🇷
💻☕

Prof. Gill g1ll

🇧🇷
💻☕
View GitHub Profile
@g1ll
g1ll / app.js
Last active February 22, 2022 18:18
CSTSI-BDA-5Sem-Aula-03-Exenplos-Firebase
import { initializeApp } from "firebase/app";
// import {getDatabase, get, ref, child, onValue, onChildAdded} from "firebase/database"
import * as fb from "firebase/database"
const firebaseConfig = {
//COLOQUE A CONFIGURAÇÃO DO SEU PROJETO
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
@g1ll
g1ll / byobuCommands
Last active August 14, 2020 23:02 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@g1ll
g1ll / parrun.sh
Created December 24, 2019 03:01 — forked from precise-simulation/parrun.sh
Bash xargs script to run parallel MATLAB and Octave jobs
#!/bin/bash
#
# Bash script using xargs to run Matlab and Octave jobs in parallel.
#
n_parruns=16 # Total number of runs.
n_parproc=3 # Number of simultaneous parallel processes.
# Define Matlab/Octave executable and main m-scipt file to run.
export runcmd='/mnt/c/Octave/Octave-4.2.1/bin/octave-cli.exe'
@g1ll
g1ll / listfolders.php
Last active September 15, 2019 18:47
Recursive PHP function to list folders and subforlders of a directory and returned a PHP Array.
<?php
function getFolders($dir = false) {
$server_sign = filter_input(INPUT_SERVER, 'SERVER_SIGNATURE', FILTER_SANITIZE_STRING);
$unix_server = (stristr($server_sign, "win")) ? false : true;
$slash = ($unix_server) ? "/" : "\\";
$dir = (!$dir) ? getcwd() : $dir;
$open_dir = opendir($dir);
$folders = [];
while ($item = readdir($open_dir)) {
if ($item != "." && $item != "..") {