-
Apache configuration file
- ubuntu -> /etc/apache2/apache2.conf
- arch -> /etc/httpd/conf/httpd.conf
-
Add mod_rewrite and .htaccess support for your site At the end of the configuration files add these lines:
#My site mod_rewrite configuration <Directory "/ABSOLUTE/PATH/YourSite"> AllowOverride All
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# This program prints all hcn (highly composite numbers) <= MAXN (=10**18) | |
# | |
# The value of MAXN can be changed arbitrarily. When MAXN = 10**100, the | |
# program needs less than one second to generate the list of hcn. | |
from math import log | |
MAXN = 10**18 |
Link to wiki: https://wiki.archlinux.org/index.php/msmtp
sudo pacman -S msmtp msmtp-mta
Edit /etc/msmtprc
as in the wiki page. If using gmail account, generate an app password at the page https://security.google.com/settings/u/1/security/apppasswords and use that one instead of the real password.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SUBSETS_OPERATIONS | |
#define SUBSETS_OPERATIONS | |
// The class SubsetFunction<T> represents a function on the subsets of | |
// {0, 1, ..., N-1} (or equivalently the integers [0, 2^N)) with values in T | |
// and offers a variety of standard operations (i.e. xor-convolution). | |
// | |
// The time complexities of the various operations are optimal. | |
// Even if not heavily optimized (in order to maintain a good readability), | |
// these implementations shall be fast enough in all situations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename T, typename ClassT, typename ...ArgT> | |
T EvaluateMemberFunction(ClassT& b, T (ClassT::*method)(ArgT...), ArgT... args) { | |
return (b.*method)(args...); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// It must be executed in a page as http://falesiaonline.it/settorefoto/123/sector-name.html | |
// Two files will be downloaded: the first is a photo of the sector with routes outlines, the second is a list of all the routes with grades and lengths. | |
function DownloadHtml(FileName, source) { | |
// Adding sector name to the source | |
var PossibleElements = document.getElementsByClassName("name-cell"); | |
var SectorName = ''; | |
for (var it in PossibleElements) { | |
var SectorTd = PossibleElements[it]; | |
if (SectorTd.tagName == 'TD') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This guide explains how to modify the classic theme of empathy (minimal one... the best one!) in order to have latex in empathy's chat windows. | |
The two files PATCH_Info.plist, PATCH_Content.html are in this same gist. | |
First of all install mathjax: | |
sudo apt-get install libjs-mathjax libjs-mathjax-doc fonts-mathjax fonts-mathjax-extras | |
Open /usr/share/adium/message-styles | |
Make a copy of Classic.AdiumMessageStyle in the same folder and rename it LatexClassic.AdiumMessageStyle | |
Open /LatexClassic.AdiumMessageStyle/Contents | |
Modify Info.plist substituting its content with the content of PATCH_Info.plist |