Skip to content

Instantly share code, notes, and snippets.

View lastk's full-sized avatar

Rafael Oliveira lastk

  • Salvador-Ba, Brazil
View GitHub Profile
@lastk
lastk / reboot_mysql_database.php
Created December 12, 2020 01:34 — forked from jasondavis/reboot_mysql_database.php
Start / Stop / Reboot MySQL Database server using SSH with PHP
<?php
// Start / Stop / Reboot MySQL Database server using SSH with PHP
// Requires the library from phpseclib.sourceforge.net / https://github.com/phpseclib/phpseclib
// Server user login data
$ssh_user = '';
$ssh_password = '';
$ssh_server_ip = '';
?>
<!DOCTYPE html>
@lastk
lastk / using-uuid-as-pk.md
Created December 29, 2020 23:14 — forked from rponte/using-uuid-as-pk.md
Não use UUID como PK nas tabelas do seu banco de dados

Pretende usar UUID como PK em vez de Int/BigInt no seu banco de dados? Pense novamente...

TL;TD

Não use UUID como PK nas tabelas do seu banco de dados.

Um pouco mais de detalhes

@lastk
lastk / nano.el
Created February 7, 2025 18:51 — forked from rougier/nano.el
NANO Emacs (minimal version: 256 lines)
;; nano-emacs.el --- NANO Emacs (minimal version) -*- lexical-binding: t -*-
;; Copyright (c) 2025 Nicolas P. Rougier
;; Released under the GNU General Public License 3.0
;; Author: Nicolas P. Rougier <[email protected]>
;; URL: https://github.com/rougier/nano-emacs
;; This is NANO Emacs in 256 lines, without any dependency
;; Usage (command line): emacs -Q -l nano.el -[light|dark]
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
@lastk
lastk / app.rb
Created September 28, 2025 17:27 — forked from radanskoric/app.rb
Turbo Frames and Streams on Sinatra
# This is a little experiment in using Turbo Frames and Streams without Rails.
# Built using just plain Sinatra as the web server.
#
# Make sure that you have sinatra and puma (or some other server) installed:
# gem install sinatra
# gem install puma
#
# You can then run the app with:
# ruby app.rb
require 'sinatra'