sudo umount /Volumes/UNTITLED
sudo mount -t ntfs -o rw,auto,nobrowse /dev/disk3s1 ~/ntfs-volume
sudo umount /Volumes/UNTITLED
sudo mount -t ntfs -o rw,auto,nobrowse /dev/disk3s1 ~/ntfs-volume
// 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 = {} |
#!/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 |
#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." |