Skip to content

Instantly share code, notes, and snippets.

View 001101's full-sized avatar

PCM 001101

View GitHub Profile
@001101
001101 / .htaccess
Created December 7, 2016 14:29 — forked from jdevalk/.htaccess
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>
@001101
001101 / gist:11d1e3459a1956e4df1e0e1f443e98bc
Created December 7, 2016 14:29 — forked from jdevalk/gist:5623050
Redirect script sample NGINX code. Make sure this location line sits above the "location /" code in your NGINX config.
location /redirect/ {
rewrite ^/redirect/(.*)$ /redirect/index.php?id=$1 last;
}
@001101
001101 / gist:23c564611e12bd0d03578bf025a8d492
Created February 18, 2017 09:07 — forked from carld/gist:87f2453ed622f92f220451b7e8ae6a26
go through all directories, test for .git/ and diff stat two branches
for dir in `find . -type d -depth 1`; do
cd $dir;
if [ -d .git ]; then
if git branch -ra | grep -q "$B2\$"; then
echo $dir;
git diff --shortstat $B1 $B2;
fi
fi
cd ..;
done
@001101
001101 / piwik_opt_out.html
Last active February 18, 2017 09:17
Piwik Opt Out iFrame Raw
<p><strong>EINSATZ VON PIWIK WEB ANALYTICS </strong></p>
<p>Diese Website benutzt <a href="http://piwik.org/" target="_blank">Piwik</a>, eine Open-Source-Software zur statistischen Auswertung der Besucherzugriffe. Piwik verwendet sog. &ldquo;Cookies&rdquo;, Textdateien, die auf Ihrem Computer gespeichert werden und die eine Analyse der Benutzung der Website durch Sie ermöglichen. Die durch den Cookie erzeugten Informationen über Ihre Benutzung dieses Internetangebotes werden auf dem Server des Anbieters in Deutschland gespeichert. Die IP-Adresse wird sofort nach der Verarbeitung und vor deren Speicherung anonymisiert. Sie können die Installation der Cookies durch eine entsprechende Einstellung Ihrer Browser-Software verhindern. Wir weisen Sie jedoch darauf hin, dass Sie in diesem Fall gegebenenfalls nicht sämtliche Funktionen dieser Website vollumfänglich nutzen können. </p>
<p><strong>Piwik aktivieren/deaktivieren</strong></p>
<iframe style="margin-top: -10px;
@001101
001101 / Textroom_Shortcuts
Last active February 18, 2017 10:17
Textroom keyboard Shortcuts
TextRoom keyboard shortcuts:
F1 opens help
F2 options
F5 check spelling
F7 opens mind mapping tool
F9 music player
F11 full screen
Ctrl-p print document
@001101
001101 / InstallingAgOnCentOS.md
Last active September 15, 2017 17:12 — forked from rkaneko/InstallingAgOnCentOS.md
Installing ag: the silver searcher on CentOS (fast file search tool)

Installing ag on CentOS

Prerequistes

  • libpcre
  • liblzma

Download, build and install

@001101
001101 / streamtester.php
Created October 3, 2017 01:34 — forked from jakob-stoeck/streamtester.php
stream tester
<?php
// You can use this file to test different video products in different players
// choose product and options
$product = 'hls'; // hls|stream_packaging|vod
$secure = true;
$staging = false;
$URLonly = false; // true to output only URL, false to output HTML
// no changes required below santa claus - happy holidays 2016
@001101
001101 / whois.conf
Created October 22, 2019 10:09 — forked from thde/whois.conf
/etc/whois.conf WHOIS records for nTLDs.
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2017-12-10 UTC
##
\.aarp$ whois.nic.aarp
\.abarth$ whois.afilias-srs.net
\.abbott$ whois.afilias-srs.net
\.abbvie$ whois.afilias-srs.net
\.abc$ whois.nic.abc
@001101
001101 / Laravel on VestaCP.md
Created October 22, 2019 18:15 — forked from peterbrinck/Laravel on VestaCP.md
Laravel web templates for VestaCP

I'm not using this or VestaCP anymore, so I can't confirm if still working or not.

I've made a new web template to make Laravel work easily on VestaCP, and so I wouldn't have to change my Laravel installation, if I ever wanted to deploy it elsewhere.

Each file should be put in /usr/local/vesta/data/templates/web/apache2

Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html

@001101
001101 / git-compressing-and-deltas.md
Created May 24, 2020 19:06 — forked from matthewmccullough/git-compressing-and-deltas.md
Git, Compression, and Deltas - An explanation

Git Compression of Blobs and Packfiles.

Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.

A simple run though of a commit sequence with only the smallest change to the image (in uncompressed TIFF format to amplify the observable behavior) aids the understanding of this deferred and different approach efficiency.

The command sequence:

Create the repo: