create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| Rechts Tap aus: | |
| synclient TapButton2=3 | |
| Rechts Click Button aus: | |
| synclient RightButtonAreaLeft=0 | |
| synclient RightButtonAreaRight=0 | |
| synclient RightButtonAreaTop=0 | |
| synclient RightButtonAreaBottom=0 |
Recently I was asked to generate PDF invoices for an online shop. I looked at various PHP PDF generators, but wasn't particularly impressed with any of them.
Then I found (via Stack Overflow) a command-line HTML-to-PDF convertor called wkhtmltopdf, which uses WebKit (the same layout engine as Safari and Google Chrome) and therefore is very accurate.
There is a class for PHP integration on the Wiki, but I found it overly complicated and it uses temp files which aren't necessary. This is the code I wrote instead.
I used Smarty for generating the HTML for the PDF, but you can use any template engine, or pure PHP if you prefer.
Note: I originally tried to install wkhtmltopdf from source, but it's much easier to use the static binary instead.
| common_auth: | |
| auth sufficient pam_exec.so quiet /root/pam.py | |
| pam.py: | |
| #!/usr/bin/python2.7 | |
| from subprocess import Popen, PIPE | |
| import re | |
| import string | |
| from array import array |
| contao3/system/modules/metamodelsattribute_notelist/FormMetaModelNotelist.php | |
| Zeile 272 | |
| ... | |
| $arrNotelist = $arrTmp; | |
| unset($arrTmp); | |
| //aufbereiten um als array verfügbar zu halten |
| File: | |
| contao3/system/modules/metamodels/MetaModels/ItemList.php | |
| public function setFilterParameters($arrPresets, $arrValues) | |
| { | |
| ... | |
| foreach ($arrProcessed as $key => $value) { | |
| $value = str_replace(array('-slash-', '-apos-'), array('/', '\''), $value); | |
| $arrProcessed[$key] = $value; |
| cat /etc/usbpower | |
| #!/bin/bash | |
| # This script attempts to read /sys/devices/ and identify usb ports and devices | |
| # that can be toggled to enable wakeup from sleep. | |
| # | |
| # Version: 2.0 | |
| # Date written: August 20, 2012 | |
| # | |
| # Copyright (C) 2012 danomac @ gentoo forums |
| var style = '.videoWrapper { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 50px; height: 0;} .videoWrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:none;}'; | |
| var htmlDiv = document.createElement('style'); | |
| htmlDiv.innerHTML = style; | |
| document.getElementsByTagName('head')[0].appendChild(htmlDiv); | |
| String.prototype.toDOM=function(){ | |
| var d=document | |
| ,i | |
| ,a=d.createElement("div") |
| SELECT ci.inventory_id, ci.inventory_quantity, cd.reservations, (ci.inventory_quantity + cd.reservations) as gesamt | |
| FROM catalog_inventory ci | |
| JOIN | |
| (SELECT cd.documentation_inventory_nr, SUM(IF(cd.documentation_on >= UNIX_TIMESTAMP(NOW()),cd.documentation_quantity,0)) as reservations | |
| FROM | |
| catalog_documentation cd | |
| GROUP BY cd.documentation_inventory_nr) as cd | |
| ON cd.documentation_inventory_nr=ci.inventory_id | |
| GROUP BY ci.inventory_id |
| apt-get install ifenslave | |
| echo "bonding" >> /etc/modules | |
| cat /etc/network/interfaces | |
| # interfaces(5) file used by ifup(8) and ifdown(8) | |
| auto lo eth0 wlan0 bond0 | |
| iface lo inet loopback | |
| # Do not receive dhcp on eth0 | |
| iface eth0 inet manual |