Skip to content

Instantly share code, notes, and snippets.

@ABooooo
ABooooo / new_gist_file_0
Created November 14, 2014 11:52
Get param from URL
$(document).ready(function(){
var urlParams;
(window.onpopstate = function () {
var match,
pl = /\+/g, // Regex for replacing addition symbol with a space
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); },
query = window.location.search.substring(1);
@ABooooo
ABooooo / new_gist_file_0
Created November 19, 2014 11:26
Add custom header typ
TS Config (root edit and code insert)
TCEFORM.tt_content.header_layout {
addItems {
10 = Gray Header
11 = Orange Header
12 = Red Header
}
}
@ABooooo
ABooooo / new_gist_file_0
Last active November 1, 2018 08:18
realUrl
.htaccess
RewriteEngine On
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]
RewriteRule ^uploads/.*$ - [L]
RewriteRule ^fileadmin/.*$ - [L]
RewriteRule ^typo3conf/.*$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
@ABooooo
ABooooo / new_gist_file_0
Last active November 1, 2018 08:18
direkt linkt to article
http://www.mysite.com/index.php?option=com_content&view=article&id=[article id]
@ABooooo
ABooooo / new_gist_file_0
Created December 4, 2014 12:28
remove blue border
element:focus {outline:0;}
@ABooooo
ABooooo / new_gist_file_0
Created December 11, 2014 09:38
Rewrite URL - if 500 server error
Go to the line "Options +FollowSymLinks" and add a "#" to comment it out as below.
#Options +FollowSymLinks (in htaccess)
@ABooooo
ABooooo / new_gist_file_0
Last active November 1, 2018 08:18
same height all columns
setTimeout(function(){
var sameHeightTop = $(".subBoxes");
if (sameHeightTop.length !== 0) {
sameHeightTop.each(function () {
var tallest = 0;
var sameHeightChildren = $(this).find(".subBox");
sameHeightChildren.each(function () {
var thisHeight = $(this).height();
if (thisHeight > tallest) {
tallest = thisHeight;
@ABooooo
ABooooo / new_gist_file_0
Created February 15, 2015 20:25
show post from category
<?php
//Protect against arbitrary paged values
$paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1;
$args = array(
'posts_per_page' => 10,
'category_name' => 'novice',
'paged' => $paged,
);
@ABooooo
ABooooo / new_gist_file_0
Created March 19, 2015 07:43
Sass version / help
sass -?
@ABooooo
ABooooo / new_gist_file_0
Created March 19, 2015 07:45
gem / ruby version
gem -v
ruby -v