Skip to content

Instantly share code, notes, and snippets.

View luizpicolo's full-sized avatar
👨‍🏫
Teaching

Luiz F. Picolo luizpicolo

👨‍🏫
Teaching
View GitHub Profile
sudo umount /Volumes/UNTITLED

sudo mount -t ntfs -o rw,auto,nobrowse /dev/disk3s1 ~/ntfs-volume

@luizpicolo
luizpicolo / IndexedDB101.js
Created February 7, 2021 23:18 — forked from cauerego/IndexedDB101.js
Very Simple IndexedDB Example
// quite untested, adapted from BigstickCarpet's gist, attempt to make it simpler to use
function openIndexedDB (fileindex) {
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
var openDB = indexedDB.open("MyDatabase", 1);
openDB.onupgradeneeded = function() {
var db = {}

Estrutura de dados

  • 08/09 -> 20/11
  • 15/09 -> 12/12
  • 22/09 -> 19/12

Frameworks 6A e 6B

  • 27/10/2020 -> 2 aulas + 1 do dia 21/08
  • 30/10/2020 -> 2 aulas + 1 do dia 21/08
#!/bin/bash
#Black 0;30 Dark Gray 1;30
#Red 0;31 Light Red 1;31
#Green 0;32 Light Green 1;32
#Brown/Orange 0;33 Yellow 1;33
#Blue 0;34 Light Blue 1;34
#Purple 0;35 Light Purple 1;35
#Cyan 0;36 Light Cyan 1;36
#Light Gray 0;37 White 1;37
# .railsrc
-B #Skip Bundle
-T #Skip Test-Unit
-d postgresql #Use postgres
const storage = multer.diskStorage({
destination: function(req, file, cb){
cb(null, 'public/uploads/');
},
filename: function(req, file, cb){
cb(null, `${file.filename}-${Date.now()}.${path.extname(file.originalname)}`);
}
})
const http = require('http');
const port = 3000;
const ip = '10.10.1.96';
const server = http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end('<h1>Instituo Federal de Mato Grosso do Sul!</h1>')
})
server.listen(port, ip, function() {
class Livro
attr_accessor :titulo, :categoria, :autor, :isbn
def initialize(titulo, categoria, autor, isbn)
@titulo = titulo
@categoria = categoria
@autor = autor
@isbn = isbn
end
end
def salvar_livro(livro_attrs = {})
File.open('livros', 'a') do |livro|
livro_attrs.each {|k, v| livro.puts "#{k}: #{v}" }
end
end
def condicional_para_saida(condicional)
return false if condicional == 2
return true
end
@luizpicolo
luizpicolo / Exercicios5
Last active August 11, 2018 15:17 — forked from lrlucena/Exercicios5
Lista de Exercícios 5 da disciplina de Programação de Computadores
#encoding: utf-8
# Escreva um programa que leia um número e mostre se ele é igual a 10.
puts "Digite um número: "
x = gets.to_i
if x==10 then
puts "O valor digitado foi 10."
else
puts "O valor digitado não foi 10."