Skip to content

Instantly share code, notes, and snippets.

@nefigcas
nefigcas / userChrome.css
Created January 12, 2026 21:26
Firefox Chrome, for use with Vertical Tabs plugin SideBerry
/* hides the native tabs */
#TabsToolbar
{
visibility: collapse;
}
/* hides the title bar */
#titlebar {
visibility: collapse;
}
@nefigcas
nefigcas / build
Last active January 29, 2026 20:54
Haskell Xmonad
#!/bin/sh
exec stack ghc -- \
--make xmonad.hs \
-i \
-ilib \
-fforce-recomp \
-main-is main \
-v0 \
-o "$1"
@nefigcas
nefigcas / backupdb.sh
Last active August 1, 2025 16:49
MySQL/MariaDB database backup script for crontab
#!/bin/bash
db_name="your_database_name"
fecha=$(date +"%Y%m%d%H%M%S")
rutarespaldo="/the/path/Where_you-want-to-store-the/DB/${db_name}.${fecha}"
mysqldump --column-statistics=0 -u root "${db_name}" > "${db_name}.${fecha}.sql"
zip -m "${rutarespaldo}.zip" "${db_name}.${fecha}.sql"
@nefigcas
nefigcas / makebase64csv.sh
Created March 25, 2025 18:06
Odoo data processing
#!/bin/bash
# Usage : MakeBase64CSV.sh infile.csv outfile.csv
# infile.csv columns are : externalID, name, filename or identifier
# infile.csv separator MUST BE |
echo \"External ID\",\"Name\",\"Image\" > $2
while IFS="|" read f1 f2 f3; do
@nefigcas
nefigcas / emacsclient-one-frame.sh
Last active January 29, 2026 18:18
Emacs client jumpapp one frame setup
#!/bin/bash
# if no args open new frame
if [ $# -eq 0 ]; then
jumpapp -R emacs || emacsclient -nc
exit
fi
emacsclient -e "(frames-on-display-list \"$DISPLAY\")" # &>/dev/null
@nefigcas
nefigcas / Paint.java
Created July 26, 2016 03:29 — forked from g9yuayon/Paint.java
Paint with RxJava and JavaFx
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.geometry.Point2D;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.canvas.Canvas;
import javafx.scene.canvas.GraphicsContext;
import javafx.scene.input.MouseEvent;
import javafx.stage.Stage;
import static javafx.scene.input.MouseEvent.*;