Skip to content

Instantly share code, notes, and snippets.

Thomas Guymer Guymer

Block or report user

Report or block Guymer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Guymer
Guymer / foobar.py
Last active Apr 1, 2018
just a little test
View foobar.py
#!/usr/bin/env python
print("Hello World")
@Guymer
Guymer / foobar.md
Last active Apr 1, 2018
just a little test
View foobar.md

Hello World

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

View stop-hotlinking-htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} .*jpg$|.*jpeg$|.*bmp$|.*gif$|.*png$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?exampledomain1 [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?exampledomain2 [NC]
RewriteRule (.*) /path/to/custom/script.php?src=$1
View stop-hotlinking-script.php
<?php
header("Content-type: text/html");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Random Date in Past
header("Cache-Control: no-cache");
header("Pragma: no-cache");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Hotlinked Image</title>
View opensuse-10p3-mylocaldomain.conf
NameVirtualHost mylocaldomain
<VirtualHost mylocaldomain>
DocumentRoot /path/to/local/web/content
ServerName mylocaldomain
</VirtualHost>
View opensuse-10p3-slideshow.desktop
[Desktop Entry]
ServiceTypes=image/*,inode/directory
Actions=Slideshow
[Desktop Action Slideshow]
Name=Start Slideshow
Icon=display
Exec=feh %F -FZd --sort filename
View opensuse-10p3-attachToEmail.desktop
[Desktop Entry]
ServiceTypes=all/all
Actions=attachToEmail
[Desktop Action attachToEmail]
Name=Attach to Email
Icon=email
Exec=thunderbird -compose `echo attachment=\'file://%F\' | sed 's/ \//,file:\/\/\//g'`
View opensuse-10p3-PStoPDF.desktop
[Desktop Entry]
ServiceTypes=application/postscript
Actions=PStoPDF
[Desktop Action PStoPDF]
Name=Convert PS to PDF
Icon=kpdf
Exec=ps2pdf %f
View opensuse-10p3-LaTeXtoPDF.desktop
[Desktop Entry]
ServiceTypes=text/x-tex
Actions=LaTeXtoPDF
[Desktop Action LaTeXtoPDF]
Name=Convert LaTeX Document to PDF
Icon=kpdf
Exec=pdflatex %f
You can’t perform that action at this time.