Skip to content

Instantly share code, notes, and snippets.

View BugBuster1701's full-sized avatar
🏠
Working from home

Glen Langer BugBuster1701

🏠
Working from home
  • T-Systems
  • Berlin, Germany
View GitHub Profile
@stefansl
stefansl / contao-db-update.php
Last active October 17, 2019 21:01
Modified path upgrade script for contao. No config editing necessary. Copy in your Contao root and run.
<?php
/*
When updating from Contao 2 to Contao 3, you must not rename the tl_files folder to files!
If you want to re­name the folder, you have to take the following steps:
· Complete the version 3 update in the install tool
· Then rename the upload folder in the back end settings to files
· Last run the modified version of Tristan's script
@andreasisaak
andreasisaak / fe_page.html5
Created June 5, 2014 19:34
footerStickAlt
<?php $this->extend('fe_page'); ?>
<?php $this->block('footer'); $this->endblock(); ?>
<?php $this->block('body'); ?>
<?php $this->parent(); ?>
<?php if ($this->footer): ?>
<footer id="footer">
<div class="inside">
<?php echo $this->footer; ?>
</div>
/* ... basics ...
-------------------------------------------------------------------------------------------------*/
nav {
border: 1px solid #000;
border-radius: 8px;
float: left;
}
ul,
li,
a,
@chani
chani / Contao2srcTo3.php
Last active December 26, 2015 12:39
Script to convert old contao 2 src format to the new one by simply replacing the path with the id's. check comment in file for details.
<?php
/**
* Copyright (c) 2013 Jean Bruenn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@bytehead
bytehead / pdf_to_jpg.php
Last active May 10, 2019 20:41
imagick pdf to jpg
<?php
// read page 1
$im = new imagick( 'test.pdf[ 0]' );
// convert to jpg
$im->setImageColorspace(255);
$im->setCompression(Imagick::COMPRESSION_JPEG);
$im->setCompressionQuality(60);
$im->setImageFormat('jpeg');
@magnetikonline
magnetikonline / README.md
Last active February 7, 2025 07:27
IE 7/8/9/10/11 Virtual machines from Microsoft - Linux w/VirtualBox installation notes.
@x-way
x-way / makeblacklist.sh
Created February 13, 2013 16:48
Create blacklist for HAVP from phishtank and adserver blacklists
#!/bin/sh
cd /etc/havp
OUTFILE=/etc/havp/blacklist
ADSERVERLIST=/etc/havp/adserverlist
PHISHTANK=/etc/havp/phishtank
MYBLACKLIST=/etc/havp/myblacklist
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 15, 2025 08:03
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@karlhorky
karlhorky / grayscale-disable.css
Created August 26, 2012 12:17
Cross-Browser CSS Grayscale
img.grayscale.disabled {
filter: url("data:image/svg+xml;utf8,&lt;svg xmlns=\'http://www.w3.org/2000/svg\'&gt;&lt;filter id=\'grayscale\'&gt;&lt;feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/&gt;&lt;/filter&gt;&lt;/svg&gt;#grayscale");
-webkit-filter: grayscale(0%);
}
@leofeyer
leofeyer / contao-db-update.php
Created August 9, 2012 13:04
Update path in database
<?php
// Database credentials
$strHost = 'localhost';
$strUser = '';
$strPassword = '';
$strDatabase = '';
// From and to path
$strFrom = 'tl_files/';