Skip to content

Instantly share code, notes, and snippets.

View hason's full-sized avatar
🙂

Martin Hasoň hason

🙂
View GitHub Profile
@shreve
shreve / pdfmarks
Last active August 5, 2023 06:44
Example of adding PDF metadata (bookmarks / ToC) with Ghostscript
[ /Title (Elementary Differential Equations)
/Author (Edwards & Penney)
/DOCINFO pdfmark
[ /Title (Contents)
/Page 6
/OUT pdfmark
[ /Count -8
/Title (1. First-Order Differential Equations)
@chadrien
chadrien / README.md
Last active September 1, 2023 12:43
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@mickaelandrieu
mickaelandrieu / upgrade2.3-to-2.7.md
Last active April 26, 2022 11:56
Complete migration guide from Symfony 2.3 LTS to Symfony 2.7 LTS

From Symfony 2.3 to Symfony 2.7: the complete guide

Objectives

  • assume your code doesn't use any deprecated from versions below Symfony 2.3
  • update dependencies from 2.3 to 2.7
  • do not support "deprecated", be "Symfony3-ready"
  • list tasks component by component, bundle by bundle.
@alexanderschnitzler
alexanderschnitzler / openletter.md
Last active August 16, 2018 19:14
An open letter to the Neos development team

An open letter to the Neos development team

Dear members of the development team, CU a few days ago I commented the announcement, that Neos and Flow get rid of "TYPO3" as part of their names, as follows:

Removing "TYPO3" from Neos and Flow makes it easier to quietly abandon these products. \o/

Additionally to this tweet I had a small twitter conversation resulting in this tweet:

@yi
yi / gist:01e3ab762838d567e65d
Created July 24, 2014 18:52
lua hex <= => string
function string.fromhex(str)
return (str:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end
function string.tohex(str)
return (str:gsub('.', function (c)
return string.format('%02X', string.byte(c))
end))
@webmozart
webmozart / README.md
Last active July 22, 2018 13:38
Composer Resource Integration
anonymous
anonymous / main.js
Created November 25, 2013 10:17
reload sf2 wdt on ajax request
$(document).ajaxComplete(function(event, XMLHttpRequest){
var token = XMLHttpRequest.getResponseHeader('x-debug-token'),
protocol = window.location.protocol,
hostname = window.location.hostname;
if(token) {
$.get(protocol+'//'+hostname+'/_wdt/'+token, function(data){
@noprompt
noprompt / word-re.txt
Last active May 2, 2016 15:30
Regular expression for matching any word in `/usr/share/dict/words`.
This file has been truncated, but you can view the full file.
(?:s(?:(?:u(?:b(?:(?:s(?:t(?:a(?:n(?:t(?:i(?:a(?:l(?:(?:i(?:s[mt]|a|ty|ze)|ly|ness))?|t(?:i(?:on|ve)|e|or)|bility)|v(?:e(?:(?:ly|ness))?|al(?:ly)?|i(?:ty|ze))|fy|ous|ze))?|c(?:e(?:less)?|h)|dard(?:ize)?)|lagmit(?:e|ic)|ge|tion)|r(?:a(?:t(?:o(?:s(?:pher(?:e|ic)|e)|r)|i(?:ve)?|al|e|um)|ct(?:ion)?)|uct(?:(?:ion(?:al)?|ur(?:al|e)))?|iate)|itu(?:t(?:i(?:on(?:a(?:l(?:ly)?|ry))?|ng(?:ly)?|ve(?:ly)?)|e(?:[dr])?|able)|ent)|o(?:r(?:eroom|y)|ck)|yl(?:ar|e)|ernal)|e(?:[ta]|r(?:v(?:i(?:en(?:t(?:(?:ly|ness))?|c[ey])|ate)|e)|o(?:sa|us)|ies|rate)|c(?:u(?:t(?:e|ive)|rity)|retar(?:ial|y)|t(?:ion)?|ive)|quen(?:t(?:(?:ial(?:ly)?|ly|ness))?|c[ey])|ns(?:u(?:al|ous)|ation|ible)|pt(?:uple)?|mi(?:fusa|tone)|xtuple|wer|ssile|gment)|i(?:d(?:i(?:ar(?:i(?:e|ly|ness)|y)|z(?:a(?:ble|tion)|e(?:r)?)|ng|st)|e(?:(?:n(?:c[ey]|t)|r))?|y)|st(?:(?:en(?:c[ey]|t(?:ial)?)|ingly))?|l(?:ic(?:ate|ic)|l)|m(?:i(?:lation|ous)|ple)|zar(?:ship)?|nuous)|c(?:ri(?:pt(?:(?:i(?:on(?:ist)?|ve(?:ly)?)|ure))?|b(?:e(?:r(?:ship)?)?|able)|ve(?:r)?)|apular(?:(?:is|y))?|
@hubgit
hubgit / README.md
Last active May 2, 2024 10:55
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@lyrixx
lyrixx / post-checkout
Created June 26, 2013 13:37
Git post checkout
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\e[0m'