Skip to content

Instantly share code, notes, and snippets.

View nivit's full-sized avatar
🇮🇹

Nicola Vitale nivit

🇮🇹
View GitHub Profile
@nivit
nivit / gist:5217271
Created March 21, 2013 22:12
Tagpy compilation: error message
gcc46 -pipe -fno-strict-aliasing -O3 -DNDEBUG -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc46 -fno-strict-aliasing -fPIC -I/usr/local/include/taglib -I/usr/local/include/python2.7 -I/usr/local/include -I/usr/local/include/python2.7 -c src/wrapper/id3.cpp -o temp.freebsd-9.1-STABLE-i386-2.7/src/wrapper/id3.o
src/wrapper/id3.cpp: In function 'void exposeID3()':
src/wrapper/id3.cpp:222:10: error: no matching function for call to 'boost::python::class_<TagLib::ID3v2::Tag, boost::noncopyable_::noncopyable, boost::python::bases<TagLib::Tag> >::def(const char [7], <unresolved overloaded function type>)'
src/wrapper/id3.cpp:222:10: note: candidates are:
/usr/local/include/boost/python/class.hpp:224:11: note: template<class Derived> boost::python::class_<T, X1, X2, X3>::self& boost::python::class_::def(const boost::python::def_visitor<Derived>&) [with Derived = Derived, W = TagLib::ID3v2::Tag, X1 = boost::noncopyable_::noncopyable, X2 = boost::python::bases<TagLib::Tag>, X3 = boost::python::detail::not_specified, boost::pyt

Keybase proof

I hereby claim:

  • I am nivit on github.
  • I am nivit (https://keybase.io/nivit) on keybase.
  • I have a public key whose fingerprint is 989A 2360 266B 0DF7 EDAF 7E2E A51E 190C 4C08 08D0

To claim this, I am signing this object:

@nivit
nivit / gist:3a7c15c656054b936c0dd16054b9b83a
Created May 25, 2020 15:48
Set up default browser in FreeBSD
* firefox
xdg-mime default firefox.desktop text/html
env BROWSER="" xdg-settings set default-web-browser firefox.desktop
env BROWSER="" xdg-settings set default-url-scheme-handler https firefox.desktop
env BROWSER="" xdg-settings set default-url-scheme-handler http firefox.desktop
* chrome (www/chromium)
xdg-mime default chromium-browser.desktop text/html
env BROWSER="" xdg-settings set default-web-browser chromium-browser.desktop
env BROWSER="" xdg-settings set default-url-scheme-handler https chromium-browser.desktop
@nivit
nivit / www.arte.it-rss.xml
Created December 29, 2021 09:24
Example of RSS feed without some titles
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Arte.it Notizie</title>
<link>http://www.arte.it/</link>
<description>Tutte le notizie sul mondo dell'arte.</description>
<language>it</language>
<copyright>© 2020 - 2021 - ARTE.it</copyright>
<lastBuildDate>Tue, 28 Dec 2021 22:34:39 CET</lastBuildDate>
#!/bin/sh
chroot_path=/compat/ubuntu
get_pa_sock_path()
{
PA_SOCK_PATH=$(sockstat | awk -v me=$(whoami) -F'[ \t]+' '
$1 == me && $2 == "pulseaudio" && $6 ~ /native/ {
print $6;
exit 0
@nivit
nivit / arteworld.it-feed.xml
Created March 18, 2022 16:31
Atom feed without a title
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
>
<channel>
@nivit
nivit / arte.it.rss
Last active March 28, 2022 11:58
RSS/Atom feed with wrong item URL (search "La città dell")
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Arte.it Notizie</title>
<link>http://www.arte.it/</link>
<description>Tutte le notizie sul mondo dell'arte.</description>
<language>it</language>
<copyright>© 2020 - 2022 - ARTE.it</copyright>
<lastBuildDate>Mon, 28 Mar 2022 13:55:29 CEST</lastBuildDate>
@nivit
nivit / 131amd64-default.log
Created November 17, 2022 15:45
Poudriere log for devel/py-Jinja2-doc (v. 3.1.2)
=>> Building devel/py-Jinja2-doc
build started at Thu Nov 17 15:46:02 CET 2022
port directory: /usr/ports/devel/py-Jinja2-doc
package name: py39-Jinja2-doc-3.1.2
building for: FreeBSD 131amd64-default-job-01 13.1-STABLE FreeBSD 13.1-STABLE amd64
maintained by: [email protected]
Makefile datestamp: -rw-r--r-- 1 root wheel 244 Nov 17 13:55 /usr/ports/devel/py-Jinja2-doc/Makefile
Ports top last git commit: 4b8ee59e2
Ports top unclean checkout: yes
Port dir last git commit: 4b8ee59e2
@nivit
nivit / freebsd-forum.rss
Created January 15, 2023 13:45
RSS feed with newline in a title
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
<title>The FreeBSD Forums</title>
<description>The FreeBSD Forums</description>
<pubDate>Sun, 15 Jan 2023 13:35:33 +0000</pubDate>
<lastBuildDate>Sun, 15 Jan 2023 13:35:33 +0000</lastBuildDate>
<generator>The FreeBSD Forums</generator>
<link>https://forums.FreeBSD.org/</link>
<atom:link rel="self" type="application/rss+xml" href="https://forums.FreeBSD.org/forums/-/index.rss"/>
@nivit
nivit / 40_custom
Created June 28, 2023 15:26
Grub menuentry for FreeBSD (zfs)
#!/bin/sh
exec tail -n +3 $0
#
# File name: /etc/grub.d/40_custom
#
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "FreeBSD - The Power To Server" {