Skip to content

Instantly share code, notes, and snippets.

@frank-bg
frank-bg / README.md
Created April 16, 2023 20:04 — forked from ponceto/README.md
Matrix characterfall on your terminal

Matrix characterfall effect

Abstract

These scripts are written to simulate the matrix characterfall on your terminal.

ASCII version

This is a version with a pure ascii charset of the matrix effect.

@frank-bg
frank-bg / 39-libinput.conf
Last active March 3, 2023 00:03
Logitech TrackMan Marble Mouse
# this maps button 8 to middle click and enable scroll whit trackball pressing button 9
# put this on /usr/share/X11/xorg.conf.d/39-libinput.conf
# refs:
# https://help.ubuntu.com/community/Logitech_Marblemouse_USB
# https://jcastellssala.com/2016/10/29/logitech-trackman-in-linux/
Section "InputClass"
Identifier "Marble Mouse"
MatchProduct "Logitech USB Trackball"
Driver "libinput"
@frank-bg
frank-bg / docker-mariadb.sh
Created April 12, 2021 19:00
docker-mariadb.sh
#!/usr/bin/env bash
docker run -d \
-v ~/vms/10.3.27:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=secret \
-p 10327:3306 \
mariadb:10.3.27
docker run -d \
@frank-bg
frank-bg / 01-lamp.sh
Last active January 20, 2021 02:10
lamp installation based on homestead settler
#!/usr/bin/env bash
function isRoot() {
if [ "$EUID" -ne 0 ]; then
return 1
fi
}
if ! isRoot; then
echo "Sorry, you need to run this as root"
[alias]
lg = log --oneline --decorate --all --graph
s = status -s -b
CREATE TABLE del0al999999 AS
WITH d AS (
SELECT 0 d UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9
), del0al999999 AS (
SELECT
d0.d+(d1.d*10)+(d2.d*100)+(d3.d*1000)+(d4.d*10000)+(d5.d*100000) d
FROM d d0
CROSS JOIN d d1
CROSS JOIN d d2
CROSS JOIN d d3
<?php
// not original work
// source: https://www.php.net/manual/en/function.strtr.php#90925
function normalize ($string) {
$table = array(
'Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z', 'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',
'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',
'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',
@frank-bg
frank-bg / development.rb
Last active October 23, 2019 23:40
development environment for vagrant
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
# Do not eager load code on boot.
config.eager_load = false
(account_id ; (Accounts) razon_social)
<?php
include_once 'config.php';
include_once 'include/Webservices/Relation.php';
include_once 'vtlib/Vtiger/Module.php';
include_once 'includes/main/WebUI.php';
$current_user=Users::getActiveAdminUser();
function foo()