Skip to content

Instantly share code, notes, and snippets.

@G-Square
G-Square / Shrink_Fedora.sh
Last active May 18, 2021 22:28
Shrink Fedora, useful when running Fedora from ram. Script will free about 2GB from /dev/mapp.
#Shrink Fedora, usefull when running from ram
#Tested on Fedora 33:
#before :/dev/mapp total 7.9GB available 1.6GB used 6.3GB 80%
#after :/dev/mapp total 7.9GB available 3.6GB used 4.2GB 53%
#save current working path
pushd
#Remove unneeded packages
sudo dnf remove -y libreoffice\* flatpak\* gnome-boxes
#Remove all languages except the one you need.
cd /usr/share/locale; sudo rm -r `ls|grep -v en_US$`;
@G-Square
G-Square / table_to_csv.rb
Last active October 15, 2015 01:30 — forked from sandys/table_to_csv.rb
convert a html table to CSV using ruby
#Thanks to Sandeep Srinivasa
#Enhanced for MySQL and phpMyAdmin CSV imports
require 'rubygems'
require 'nokogiri'
require 'csv'
#check for input file
if (!ARGV[0].nil? && File.file?(ARGV[0]))
puts ARGV[0]
file = File.open(ARGV[0])