Skip to content

Instantly share code, notes, and snippets.

@ryfactor
ryfactor / port-cvs-to-git-with-reposurgeon.md
Created April 27, 2022 03:33
Port CVS repositories to git with reposurgeon

Port CVS repositories to git with reposurgeon

In a rush to change your old CVS repositories to git? Don't be. Take your time and get it right with Eric Raymond's reposurgeon. (But make haste while SourceForge is still up...!)

Some folk believe that reposurgeon is complicated, and that a simple invocation of cvs-fast-export will do. Arguably this is not true, in fact cvs-fast-export is just one of the tools in the reposurgeon toolset, and while it can be used by itself it's really better used as part of the overarching reposurgeon suite. Moreover, using cvssync, cvs-fast-export and git fast-import together means you are using a jumble of command line steps, whereas reposurgeon (built on those tools) entails just setting up some config files and letting it rip. Reposurgeon also has options for updating author info, timezones, character encoding, and more. So reposurgeon is more straightforward than trying to use cvs-fast-export directly, is more feature

@frabert
frabert / COPYING
Last active December 21, 2023 13:35
Favicons for HN
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@yunga
yunga / Powershell Rosetta Stone.md
Last active April 4, 2024 07:50
Dos/Unix/Powershell Commands

Powershell Rosetta Stone

[CMD] [Unix] [Powershell] Synopsis
HELP [man] [Get-Help] Displays information about commands and concepts.
[apropos] [Get-Command] Gets all commands.
[Show-Command] Displays PowerShell commands in a graphical window.

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@andyrbell
andyrbell / scanner.sh
Last active November 3, 2024 13:42
Make a pdf look scanned using ImageMagick
# use ImageMagick convert
# the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf
convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf
@alepez
alepez / fix.md
Created November 25, 2016 13:59
Ubuntu 16.04 (EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
sudo apt-get install xserver-xorg-legacy

Edit /etc/X11/Xwrapper.config

allowed_users=anybody
needs_root_rights=yes
@bkaradzic
bkaradzic / orthodoxc++.md
Last active November 8, 2024 21:21
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@ThomasG77
ThomasG77 / rename_invalid_characters_linux.sh
Last active April 27, 2022 00:05
How to deal with renaming invalid UTF8 characters in directories or files
## Reminder to deal with renaming invalid UTF8 characters (if you are using latin-1 also called iso-8859-1)
## Sources: http://unix.stackexchange.com/questions/6460/bulk-rename-or-correctly-display-files-with-special-characters
## To use it, do a chmod +x rename_invalid_characters_linux.sh; and after do ./rename_invalid_characters_linux.sh your_dir_where_you_want_to_scan_and_rename
# First command to add
grep-invalid-utf8 () {
perl -l -ne '/^([\000-\177]|[\300-\337][\200-\277]|[\340-\357][\200-\277]{2}|[\360-\367][\200-\277]{3}|[\370-\373][\200-\277]{4}|[\374-\375][\200-\277]{5})*$/ or print'
}