Skip to content

Instantly share code, notes, and snippets.

View fabiobruna's full-sized avatar

Fabio Bruna fabiobruna

View GitHub Profile
@fabiobruna
fabiobruna / mojave.xml
Last active January 9, 2021 09:57 — forked from trongthanh/mojave.xml
macOS Mojave dynamic background re-implement as GTK+ background slideshow. Background images are changed to reflect the time of the day.
<!-- Instructions:
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip
- Save this xml file next to the Mojave background files
- Fix the path /home/XXXXX/Pictures/Wallpaper/ to your location
- Lastly, either:
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path)
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml
-->
<background>
<starttime>
@fabiobruna
fabiobruna / pre-commit
Created October 29, 2016 11:36 — forked from ashwoods/pre-commit
pre-commit hook for VERSION file
#!/bin/sh
# Tag revisions like this:
# $ git tag -a -m "Version 0.2" v0.2 HEAD
VF=VERSION
DEFAULT_VERSION=UNKNOWN
LF='
'
@fabiobruna
fabiobruna / movedigiphotos.bash
Created August 2, 2016 13:58 — forked from jvhaarst/movedigiphotos.bash
Bash script to move images, based on exif data and file timestamp
#!/bin/bash
# Reads EXIF creation date from all .JPG files in the
# current directory and moves them carefully under
#
# $BASEDIR/YYYY/YYYY-MM/YYYY-MM-DD/
#
# ...where 'carefully' means that it does not overwrite
# differing files if they already exist and will not delete
# the original file if copying fails for some reason.
@fabiobruna
fabiobruna / nl-dutch-valuta-eur.php
Last active June 22, 2016 11:41
EUR/bedrag NL format
function valuta($s)
{
if (empty($s)) {
return false;
} else {
$s = sprintf('&euro;'." %s", number_format($s, 2, ',', '.'));
return $s;
}
}
SELECT FORMAT(getdate(), N'yyyy-MM-dd hh:mm');
find /tmp -type f -print| awk -F/ ' length($NF) > 142 '
@fabiobruna
fabiobruna / wrtie_to_excel_dyn_headers
Created February 14, 2016 07:46
Opzetjes met dynamische headers. Om uit de plukken. Schrijven naar Excel met C# From http://www.codeproject.com/Questions/516514/Addingplusdataplustoplusanplusexcelplusfileplususi
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.Office.Interop.Excel
 
<system.addin.addin("scriptmain",> _
<system.clscompliantattribute(false)> _
Partial Public Class ScriptMain
@fabiobruna
fabiobruna / wrtie_to_excel
Created February 14, 2016 07:45
Schrijven naar Excel met C#(deels, nog niet dynamisch voor headers). From http://stackoverflow.com/questions/23041021/how-to-write-some-data-to-excel-file-xlsx
Microsoft.Office.Interop.Excel.Application oXL;
Microsoft.Office.Interop.Excel._Workbook oWB;
Microsoft.Office.Interop.Excel._Worksheet oSheet;
Microsoft.Office.Interop.Excel.Range oRng;
object misvalue = System.Reflection.Missing.Value;`enter code here`
try
{
//Start Excel and get Application object.
oXL = new Microsoft.Office.Interop.Excel.Application();
oXL.Visible = true;
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
$echo -n 😕 | hexdump
0000000 f0 9f 98 95
0000004
$echo -e "\xf0\x9f\x98\x95"
😕
$PS1=$'\xf0\x9f\x98\x95 >'
😕 >