Skip to content

Instantly share code, notes, and snippets.

View 0x1F602's full-sized avatar

PN 0x1F602

  • International Space Station
View GitHub Profile
@eloyesp
eloyesp / gnucash2ledger.rb
Created August 18, 2017 14:43
Migrate GNUcash to ledger-cli
# gnucash2ledger.rb
#
# Usage:
# ruby gnucash2ledger.rb < origen.gnucash > destino.ledger
#
# Make sure that the gnucash file is uncompressed
require 'nokogiri'
require 'date'
require 'bigdecimal'
@HarmJ0y
HarmJ0y / PowerView-3.0-tricks.ps1
Last active April 22, 2024 18:43
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@augmt
augmt / organizing-photos-with-duplicate-and-similarity-checking.md
Last active August 2, 2023 16:49
Detecting similar and identical images using perseptual hashes

Detecting similar and identical images using perseptual hashes

Couple of my hobbies are travelling and photography. I love to take pictures and experiment with photography. Usually after my trips, I just copy the photos to either my iPad or couple of my external hard disks. After 10 years, I have over 200K photos distributed across several disks and machines. I had to find a way to organize these photos and create a workflow for future maintenance. In this post I want to address one of the issues I had to solve: ** finding duplicate images **.

First, I needed to find out what exactly is a duplicate image. Analysing my photos, I found couple of interesting things:

  1. Identical images: There were multiple copies of the same photo in different directories with different names.
  2. Similar images: I usually bracket (exposure compensate or flash compensate) important pictures. So I have photos that visually appear to be the same, but may be a little darker/lighter based on e
@p1nox
p1nox / postgresql_configuration_on_ubuntu_for_rails.md
Last active November 29, 2023 04:38
PostgreSQL configuration without password on Ubuntu for Rails

Abstract

You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev
@rkulla
rkulla / quickscan.pl
Last active December 29, 2022 05:39
Simple Perl-based Port Scanner
#!/usr/bin/perl
# Easy port scanner
# I wrote this in the 90s to help learn socket programming
# ./quickscan -h for usage
use Socket;
$| = 1; # so \r works right
my ($ip, $protocol, $port, $myhouse, $yourhouse, $log);

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server: