CINXE.COM

dalme.net – Happy hacking!

<!doctype html> <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en-US"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en-US"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en-US"> <![endif]--> <!-- Consider adding a manifest.appcache: h5bp.com/d/Offline --> <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> <head> <meta charset="UTF-8" /> <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="cleartype" content="on"> <!-- Responsive and mobile friendly stuff --> <meta name="HandheldFriendly" content="True"> <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="profile" href="http://gmpg.org/xfn/11" /> <title>dalme.net &#8211; Happy hacking!</title> <link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link rel='dns-prefetch' href='//s.w.org' /> <link rel="alternate" type="application/rss+xml" title="dalme.net &raquo; Feed" href="https://dalme.net/feed/" /> <link rel="alternate" type="application/rss+xml" title="dalme.net &raquo; Comments Feed" href="https://dalme.net/comments/feed/" /> <script type="text/javascript"> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/11\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/11\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/dalme.net\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.9.26"}}; !function(e,a,t){var n,r,o,i=a.createElement("canvas"),p=i.getContext&&i.getContext("2d");function s(e,t){var a=String.fromCharCode;p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,e),0,0);e=i.toDataURL();return p.clearRect(0,0,i.width,i.height),p.fillText(a.apply(this,t),0,0),e===i.toDataURL()}function c(e){var t=a.createElement("script");t.src=e,t.defer=t.type="text/javascript",a.getElementsByTagName("head")[0].appendChild(t)}for(o=Array("flag","emoji"),t.supports={everything:!0,everythingExceptFlag:!0},r=0;r<o.length;r++)t.supports[o[r]]=function(e){if(!p||!p.fillText)return!1;switch(p.textBaseline="top",p.font="600 32px Arial",e){case"flag":return s([55356,56826,55356,56819],[55356,56826,8203,55356,56819])?!1:!s([55356,57332,56128,56423,56128,56418,56128,56421,56128,56430,56128,56423,56128,56447],[55356,57332,8203,56128,56423,8203,56128,56418,8203,56128,56421,8203,56128,56430,8203,56128,56423,8203,56128,56447]);case"emoji":return!s([55358,56760,9792,65039],[55358,56760,8203,9792,65039])}return!1}(o[r]),t.supports.everything=t.supports.everything&&t.supports[o[r]],"flag"!==o[r]&&(t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&t.supports[o[r]]);t.supports.everythingExceptFlag=t.supports.everythingExceptFlag&&!t.supports.flag,t.DOMReady=!1,t.readyCallback=function(){t.DOMReady=!0},t.supports.everything||(n=function(){t.readyCallback()},a.addEventListener?(a.addEventListener("DOMContentLoaded",n,!1),e.addEventListener("load",n,!1)):(e.attachEvent("onload",n),a.attachEvent("onreadystatechange",function(){"complete"===a.readyState&&t.readyCallback()})),(n=t.source||{}).concatemoji?c(n.concatemoji):n.wpemoji&&n.twemoji&&(c(n.twemoji),c(n.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style type="text/css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='sitepoint-base-vendor-css-css' href='https://dalme.net/wp-content/themes/sitepoint-base/css/vendors.min.css?ver=4.1.1' type='text/css' media='all' /> <link rel='stylesheet' id='sitepoint-fonts-css' href='//fonts.googleapis.com/css?family=Open+Sans:400,400i,700,700i|Dosis:700&#038;subset=latin' type='text/css' media='all' /> <link rel='stylesheet' id='sitepoint-base-style-css' href='https://dalme.net/wp-content/themes/sitepoint-base/style.css?ver=4.9.26' type='text/css' media='all' /> <script type='text/javascript' src='https://dalme.net/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script> <script type='text/javascript' src='https://dalme.net/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script> <script type='text/javascript' src='https://dalme.net/wp-content/themes/sitepoint-base/js/vendors.min.js?ver=1.0.0'></script> <link rel='https://api.w.org/' href='https://dalme.net/wp-json/' /> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://dalme.net/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://dalme.net/wp-includes/wlwmanifest.xml" /> <meta name="generator" content="WordPress 4.9.26" /> <style type="text/css"> body, h1, h2, h3, h4, h5, h6, p, .header-meta a:visited, .smallprint a:visited, .site-content, .fa, .site-title a, .main-navigation a { color: ; } .post-categories a { background: ; </style> </head> <body class="home blog"> <div id="wrapper" class="hfeed site"> <div class="visuallyhidden skip-link"><a href="#primary">Skip to main content</a></div> <div id="headercontainer"> <header id="masthead" class="grid-container site-header" role="banner"> <div class="grid-40 tablet-grid-40 site-title"> <h1><a href="https://dalme.net/" rel="home">dalme.net</a></h1> <p class="site-description">Happy hacking!</p> </div> <!-- /.grid-40.site-title --> <div class="grid-60 tablet-grid-60"> <nav id="site-navigation" class="main-navigation" role="navigation"> <h3 class="menu-toggle assistive-text">Menu</h3> <div class="assistive-text skip-link"><a href="#content" title="Skip to content">Skip to content</a></div> <div class="navigation_container"><ul id="menu-mainmenu" class="navigation nav-menu"><li id="menu-item-11" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-11"><a href="https://dalme.net">Home</a></li> <li id="menu-item-56" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-56"><a href="https://dalme.net/amayaos/">AmayaOS</a></li> <li id="menu-item-43" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-43"><a href="https://dalme.net/gnusocialshell/">GnuSocialShell</a></li> <li id="menu-item-158" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-158"><a href="https://dalme.net/gnusocial-cc/">gnusocial.cc</a></li> </ul></div> </nav> <!-- /.site-navigation.main-navigation --> </div> <!-- /.grid-60 --> </header> <!-- /#masthead.grid-container.site-header --> </div> <!-- /#headercontainer --> <div id="maincontentcontainer"> <div id="primary" class="grid-container site-content" role="main"> <div class="grid-70 tablet-grid-70"> <article id="post-164" class="post-164 post type-post status-publish format-standard hentry category-gnusocial"> <header class="entry-header"> <h1 class="entry-title"> <a href="https://dalme.net/2018/09/how-to-add-a-captcha-to-the-registration-form-on-a-qvitter-gnusocial-server/" rel="bookmark">How to add a Captcha to the registration form on a Qvitter GNUsocial server</a> </h1> </header> <!-- /.entry-header --> <div class="entry-content"> <p><a href="https://dalme.net/wp-content/uploads/2017/12/GNU-social-logo.svg_.png"><img class="aligncenter size-large wp-image-21" src="https://dalme.net/wp-content/uploads/2017/12/GNU-social-logo.svg_-1024x322.png" alt="" width="806" height="253" srcset="https://dalme.net/wp-content/uploads/2017/12/GNU-social-logo.svg_-1024x322.png 1024w, https://dalme.net/wp-content/uploads/2017/12/GNU-social-logo.svg_-300x94.png 300w, https://dalme.net/wp-content/uploads/2017/12/GNU-social-logo.svg_-768x242.png 768w" sizes="(max-width: 806px) 100vw, 806px" /></a></p> <p>As you might know I&#8217;m currently hosting <a href="https://dalme.net/gnusocial-cc/">gnusocial.cc</a>, a GNU Social server (you can find a lot of useful information in the link) which instead of the &#8220;classic&#8221; interface of this social network uses <a href="https://github.com/hannesmannerheim/qvitter">Qvitter</a>, a plugin that makes better the server appearance.</p> <p>My problem came when I saw that spam bots were creating a lot of new accounts on the server. I tried using the SimpleCaptcha plugin, which is included by default on GNU social, and also FacileCaptcha, which was created by XRevan86 (the admin of LoadAverage.org) but they only work with the classical interface. After searching for a while and talking to some people I was told of a Captcha-plugin for Qvitter: <a href="https://gitgud.io/panjoozek413/qvittersimplesecurity">QvitterSimpleSecurity</a>.</p> <h2>Install &amp; Set Up QvitterSimpleSecurity on GNU Social</h2> <p>Go to your plugin directory (local/plugins or plugins) and clone the Git repository of the plugin we are talking about:</p> <p><code>$ git clone https://gitgud.io/panjoozek413/qvittersimplesecurity</code></p> <p>Rename the plugin directory (GNU social is case sensitive) to QvitterSimpleSecurity:</p> <p><code>$ mv qvittersimplesecurity QvitterSimpleSecurity</code></p> <p>To enable the plugin just add (using a text editor like e.g. nano) the following line to your config.php (in the root directory of your GNU Social installation):</p> <p><code>addPlugin('QvitterSimpleSecurity');</code></p> <p>Visit the registration page of Qvitter in order to check that the Captcha is working 馃檪</p> <p><a href="https://dalme.net/wp-content/uploads/2018/09/c126eb66eb7b1781a5c1af0151e1b6dede634ff08a6a1f263ecbd9c44c2cc89c.png"><img class="aligncenter size-full wp-image-167" src="https://dalme.net/wp-content/uploads/2018/09/c126eb66eb7b1781a5c1af0151e1b6dede634ff08a6a1f263ecbd9c44c2cc89c.png" alt="" width="589" height="551" /></a></p> </div> <!-- /.entry-content --> </article> <!-- /#post --> <article id="post-117" class="post-117 post type-post status-publish format-standard hentry category-git"> <header class="entry-header"> <h1 class="entry-title"> <a href="https://dalme.net/2018/07/how-to-mirror-a-git-repository/" rel="bookmark">How to mirror a git repository</a> </h1> </header> <!-- /.entry-header --> <div class="entry-content"> <p><a href="https://dalme.net/wp-content/uploads/2018/01/git.png"><img class="aligncenter size-full wp-image-90" src="https://dalme.net/wp-content/uploads/2018/01/git.png" alt="" width="588" height="200" srcset="https://dalme.net/wp-content/uploads/2018/01/git.png 588w, https://dalme.net/wp-content/uploads/2018/01/git-300x102.png 300w" sizes="(max-width: 588px) 100vw, 588px" /></a>As I was working on libgnusocial I went into trouble because we have three different git repositories: <a href="https://gitlab.com/DalmeGNU/libgnusocial">Gitlab</a>, <a href="https://github.com/dalmemail/libgnusocial">Github</a> &amp; <a href="https://code.freedombone.net/bashrc/libgnusocial">code.freedombone.net</a> and I wanted to keep them all updated. To do this I just work with one (at Gitlab) and I treat the others as mirrors. First of all, to mirror a git repository we need to clone it using the &#8220;mirror&#8221; argument:</p> <p><code>$ git clone --mirror https://gitlab.com/user/repository</code></p> <p>Then move into the cloned repository directory (which git ends in &#8220;.git&#8221; due to the mirror cloning process):</p> <p><code>$ cd repository.git</code></p> <p>And finally push into an empty repository or an outdated mirror of our repository:</p> <p><code>$ git push --mirror https://gitlab.com/user/another_repository</code></p> </div> <!-- /.entry-content --> </article> <!-- /#post --> <article id="post-105" class="post-105 post type-post status-publish format-standard has-post-thumbnail hentry category-i3wm"> <header class="entry-header"> <h1 class="entry-title"> <a href="https://dalme.net/2018/01/set-random-wallpaper-in-i3wm/" rel="bookmark">Set random wallpaper in i3wm</a> </h1> <a href="https://dalme.net/2018/01/set-random-wallpaper-in-i3wm/" title="Permalink to Set random wallpaper in i3wm"> <img width="806" height="300" src="https://dalme.net/wp-content/uploads/2018/01/i3wm-806x300.png" class="attachment-sitepoint_base_theme_post_feature_full_width size-sitepoint_base_theme_post_feature_full_width wp-post-image" alt="" /> </a> </header> <!-- /.entry-header --> <div class="entry-content"> <p style="text-align: center;"><em>&#8220;i3 is a <a href="http://en.wikipedia.org/wiki/Tiling_window_manager">tiling window manager</a>, completely written from scratch. The target platforms are GNU/Linux and BSD operating systems, our code is Free and Open Source Software (FOSS) under the BSD license. i3 is primarily targeted at advanced users and developers.&#8221; &#8212; <a href="https://i3wm.org">i3wm.org</a></em></p> <p>I&#8217;ve just moved to Devuan GNU/Linux 1.0.0 &#8220;Jessie&#8221; and installed i3wm as desktop environment. While I was setting it up I wanted to set a wallpaper (instead of the black background that comes by default) chosen from those stored in a directory. First of all we have to install the tool &#8220;feh&#8221;. In Debian/Devuan:</p> <p><code># apt-get install feh</code></p> <p>Now, we have to add to the end of the i3 config file (located in ~/.i3/config) the following line (which simply calls feh):</p> <p><code>exec --no-startup-id feh --randomize --bg-scale /path/to/wallpapers/*</code></p> <p>And then restart i3wm (at least in my case it doesn&#8217;t work just reload).</p> </div> <!-- /.entry-content --> </article> <!-- /#post --> <article id="post-89" class="post-89 post type-post status-publish format-standard hentry category-git"> <header class="entry-header"> <h1 class="entry-title"> <a href="https://dalme.net/2018/01/skip-ssl-validation-while-cloning-a-git-repository/" rel="bookmark">Skip SSL validation while cloning a Git repository</a> </h1> </header> <!-- /.entry-header --> <div class="entry-content"> <p><a href="https://dalme.net/wp-content/uploads/2018/01/git.png"><img class="aligncenter size-full wp-image-90" src="https://dalme.net/wp-content/uploads/2018/01/git.png" alt="" width="588" height="200" srcset="https://dalme.net/wp-content/uploads/2018/01/git.png 588w, https://dalme.net/wp-content/uploads/2018/01/git-300x102.png 300w" sizes="(max-width: 588px) 100vw, 588px" /></a> While I was trying to clone the <a href="https://gnunet.org/git/libmicrohttpd.git">libmicrohttpd Git repository</a> I got the following fail:</p> <h6><code>fatal: unable to access 'https://gnunet.org/git/libmicrohttpd.git/': server certificate verification failed.</code></h6> <p>&nbsp;</p> <p>The easy way to fix it&#8217;s disable the SSL verification at the same command line where we clone the repository, by setting the GIT_SSL_NO_VERIFY variable to &#8220;true&#8221;.</p> <h6><code>$ GIT_SSL_NO_VERIFY=true git clone --recursive聽https://gnunet.org/git/libmicrohttpd.git/</code></h6> <p>&nbsp;</p> <p>We&#8217;ll get our local copy of the repository. If we&#8217;re going to work on it rather than just compiling or installing (that was my case) then we can disable SSL certification checking for that repository:</p> <h6><code>$ git config http.sslVerify "false"</code></h6> </div> <!-- /.entry-content --> </article> <!-- /#post --> <article id="post-57" class="post-57 post type-post status-publish format-standard has-post-thumbnail hentry category-gnusocialshell"> <header class="entry-header"> <h1 class="entry-title"> <a href="https://dalme.net/2018/01/compiling-gnusocialshell-1-3-0-on-gnu-linux/" rel="bookmark">Compiling GnuSocialShell 1.3.0 on GNU/Linux</a> </h1> <a href="https://dalme.net/2018/01/compiling-gnusocialshell-1-3-0-on-gnu-linux/" title="Permalink to Compiling GnuSocialShell 1.3.0 on GNU/Linux"> <img width="806" height="300" src="https://dalme.net/wp-content/uploads/2018/01/GnuSocialShell-1.2.0-806x300.png" class="attachment-sitepoint_base_theme_post_feature_full_width size-sitepoint_base_theme_post_feature_full_width wp-post-image" alt="" /> </a> </header> <!-- /.entry-header --> <div class="entry-content"> <h2 style="text-align: center;">Dependencies</h2> <p>First of all you need to install the following build utilities which are part of the <a href="https://www.gnu.org">GNU</a> project:</p> <ul> <li>gcc</li> <li>make</li> <li>autotools</li> <li>autoconf</li> </ul> <p>Also you have to install the packages that are required by GnuSocialShell itself:</p> <ul> <li><a href="https://curl.haxx.se/libcurl/">libcurl</a></li> <li>libreadline (optional; just if you wish to have TAB-autocompletion)</li> </ul> <p>In Debian GNU/Linux (and derivates such as Ubuntu, Linux Mint, Trisquel GNU, &#8230;) you can get them using APT:</p> <h6 style="text-align: left;"><code># apt-get install gcc make libcurl4-gnutls-dev autotools-dev autoconf libreadline-dev</code></h6> <h2 style="text-align: center;">Get the Source Code</h2> <p>You can get the source code of GnuSocialShell 1.3.0聽 as a ZIP file <a href="https://github.com/dalmemail/GnuSocialShell/archive/e3e6a3cb5b4be61cd871d963052b013474ba86b9.zip">from this link</a>. Once you get it, unzip it.</p> <h2 style="text-align: center;">Compile GnuSocialShell</h2> <p>To compile GnuSocialShell just open a shell/terminal emulator in the unzipped directory and type:</p> <h6><code>$ touch config.rpath &amp;&amp; autoreconf -iv &amp;&amp; ./configure --prefix=/usr/local &amp;&amp; make</code></h6> <p>If everything is okay (it should be) you will get a binary file called &#8220;gnusocialshell&#8221; in the compilation directory. You can also install it into your system by typing (as root):</p> <h6><code># make install</code></h6> <p>The installation directory is /usr/local/bin. If you want to install it in /usr/bin just set the prefix of ./configure to /usr in the compilation command. To remove GnuSocialShell from your system, type:</p> <h6><code># make uninstall</code></h6> <p>&nbsp;</p> <p>Before you use GnuSocialShell you have to configurate it; Please read &#8220;Setting up GnuSocialShell 1.3.0&#8221; (not redacted yet)</p> </div> <!-- /.entry-content --> </article> <!-- /#post --> </div> <!-- /.col.grid-70 --> <div class="grid-30 tablet-grid-30 mobile-grid-100"> <div id="secondary" class="widget-area" role="complementary"> <aside id="search-2" class="widget widget_search"><form role="search" method="get" class="search-form" action="https://dalme.net/"> <label> <span class="screen-reader-text">Search for:</span> <input type="search" class="search-field" placeholder="Search &hellip;" value="" name="s" /> </label> <input type="submit" class="search-submit" value="Search" /> </form></aside><aside id="media_image-2" class="widget widget_media_image"><h3 class="widget-title">GNU Is Not Unix!</h3><a href="https://www.gnu.org"><img width="535" height="523" src="https://dalme.net/wp-content/uploads/2017/12/heckert_gnu.transparent.png" class="image wp-image-15 attachment-full size-full" alt="" style="max-width: 100%; height: auto;" srcset="https://dalme.net/wp-content/uploads/2017/12/heckert_gnu.transparent.png 535w, https://dalme.net/wp-content/uploads/2017/12/heckert_gnu.transparent-300x293.png 300w" sizes="(max-width: 535px) 100vw, 535px" /></a></aside><aside id="text-2" class="widget widget_text"><h3 class="widget-title">Run GNU+Linux</h3> <div class="textwidget"><p><a href="http://www.upgradefromwindows8.com"><img src="//static.fsf.org/fsforg/graphics/windows-infographic_share.png" alt="Close Windows, Open Doors"/></a></p> </div> </aside> </div> <!-- /#secondary.widget-area --> </div> <!-- /.grid-30 --> </div> <!-- /#primary.grid-container.site-content --> </div> <!-- /#maincontentcontainer --> <div id="footercontainer"> <div class="grid-container smallprint"> <div class="grid-100"> <p>Proudly powered by <a href="http://wordpress.org/">WordPress</a></p> </div> <!-- /.grid-100 --> </div> <!-- /.grid-container.smallprint --> </div> <!-- /.footercontainer --> </div> <!-- /.#wrapper.hfeed.site --> <script type='text/javascript' src='https://dalme.net/wp-includes/js/wp-embed.min.js?ver=4.9.26'></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10