Top HN posts
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
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 |
⚠️ 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,
# 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 |
sudo apt-get install xserver-xorg-legacy
Edit /etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=yes
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.
## 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' | |
} |