Skip to content

Instantly share code, notes, and snippets.

View hallison's full-sized avatar
😊
I may be slow to respond.

Hallison Batista hallison

😊
I may be slow to respond.
View GitHub Profile
@hallison
hallison / sites.conf
Last active February 6, 2020 20:17
Deploys para vários sites usando o nome de domínio no nome do diretório
# From https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html
# and https://httpd.apache.org/docs/2.4/vhosts/mass.html.
UseCanonicalName Off
LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
<Directory "/home/deploy/sites">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
@hallison
hallison / gist:9dc0ecdec3190de9a115405f85ba654c
Created July 25, 2020 00:28
Copy and paste with footer information (from https://braziljournal.com/)
$(document).ready(function() {
$(document).on('copy', function () {
var selection = window.getSelection();
var copyFooter = '<br><br>Leia mais em <a href="' + document.location.href + '">' + document.location.href + '</a>';
var copyHolder = $('<div>', {
html: (selection + '').substring(0, 140) + '...' + copyFooter,
style: {
position: 'absolute',
left: '-99999px'}
}