Skip to content

Instantly share code, notes, and snippets.

View akroii's full-sized avatar
:bowtie:
Busy Agenturfutzie

Andreas Kroll akroii

:bowtie:
Busy Agenturfutzie
View GitHub Profile
@akroii
akroii / README.md
Last active September 3, 2015 13:37 — forked from hofmannsven/README.md
Update the hosts file in /private/etc/hosts to maintain multiple domains/hostnames on a local machine for 127.0.0.1 and setup a VirtualHost container in /Applications/MAMP/conf/apache/extra/httpd-vhost.conf via /Applications/MAMP/conf/apache/httpd.conf for a name-based virtual host.
if(jQuery().pluginName) {
alert("works");
}
@akroii
akroii / Css
Created June 2, 2016 04:58
Margin Center viewport
.u-release {
margin-left: calc(-50vw + 50%);
margin-right: calc(-50vw + 50%);
}
@akroii
akroii / gist:b2caaeb371bef0243b78ff9a9dcb4a1d
Last active November 29, 2016 10:57
Supercahrge your xampp
/etc/apache2/httpd.conf
ServerName 127.0.0.1:80
Listen 127.0.0.1:8080
etc/hosts
127.0.0.1 127.0.0.1
my.ini
bind-address = ::
@akroii
akroii / .htaccess
Created June 20, 2016 13:59 — forked from seoagentur-hamburg/.htaccess
Die optimale .htaccess-Datei für mehr Speed und Sicherheit
# ----------------------------------------------------------------------
# | Komprimierung und Caching |
# ----------------------------------------------------------------------
# Serve resources with far-future expires headers.
#
# (!) If you don't control versioning with filename-based
# cache busting, you should consider lowering the cache times
# to something like one week.
#
<link rel="preconnect" href="{{env::host}}/{{env::files_url}}">
<link rel="dns-prefetch" href="{{env::host}}{{env::files_url}}">
<link rel="preconnect" href="{{env::host}}/{{env::assets_url}}">
<link rel="dns-prefetch" href="//www.google-analytics.com">
php.input_encoding
php.internal_encoding
php.output_encoding
iconv.input_encoding
iconv.internal_encoding
iconv.output_encoding
mbstring.http_input
mbstring.internal_encoding
mbstring.http_output
'<a href="'.parse_url(\Environment::get('request'), PHP_URL_PATH).'?seite_nr='.$i.'">'.$i.'</a>';
@akroii
akroii / php
Last active December 18, 2020 16:24
find content by id of its page
$objPage = \PageModel::findByIdOrAlias( $alias );
$strUrl = $this->generateFrontendUrl( $objPage->row() );
$strUrl = $this->replaceInsertTags('{{link_url::pageAlias}}');
var_dump(parse_url(\Environment::get('request'), PHP_URL_PATH));
$url = parse_url(\Environment::get('request'), PHP_URL_PATH);
var_dump($this->data[0]['jumpTo']);
var_dump(parse_url(\Environment::get('request'), PHP_URL_PATH));
var_dump($this->data[0]['jumpTo']['url']);