Skip to content

Instantly share code, notes, and snippets.

View lthurston's full-sized avatar

Lucas Thurston lthurston

View GitHub Profile
@lthurston
lthurston / tomcat7
Last active August 29, 2015 14:02 — forked from zdavis/tomcat7
#!/bin/bash
# chkconfig: 2345 95 20
# description: tomcat7 start / stop service
# processname: tomcat7
#
# Tomcat 7 start/stop/status script
# Forked from: https://gist.github.com/valotas/1000094
# @author: Miglen Evlogiev <bash<a href="/miglen">@miglen</a>.com>
#
# Release updates:
@lthurston
lthurston / gist:2791063
Created May 25, 2012 23:01
jQuery Mobile 1.1 Modifications to Respect Static Base Href
jquery.mobile-1.1.0.js
@@ -7,6 +7,7 @@
* http://jquery.org/license
*
*/
+
(function ( root, doc, factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
@@ -3097,8 +3098,9 @@ $.mobile.transitionFallbacks = {};
<?php
$aTag = '<a href="news-test/ams-list-dev.html#c131546" class="fancy-link" rel="131546">';
$regex = '/(href="[^#]+(#[A-Za-z0-9]+)")/';
if(preg_match($regex,$string,$matches)) {
$search = $matches[0];
$replace = 'href="'.$matches[2].'"';
// Sort the resources
$sortedResources = array();
$resourceUidsArray = t3lib_div::trimExplode(',',$resourceUids);
foreach($resourceUidsArray as $uid) {
foreach($resources as $resource) {
if($resource->getUid() == $uid) {
$sortedResources[] = $resource;
public function findAllByUids($uids) {
$uids = t3lib_div::trimExplode(',',$uids);
$query = $this->createQuery();
$res = $query->matching($query->in('uid',$uids))->execute();
return $res;
}
// This is a multiline regex so you can feed it a multi line string
if(preg_match('/^.*\$typo_db_username[^\']+\'([^\']+)\'.*$/m',$test,$matches)) {
$username = $matches[1];
}
// Love, Lulu
plugin.tx_pyramisresources {
settings {
}
persistence {
storagePid = 51
}
view {
templateRootPath = EXT:tx_pyramisresources/Resources/Private/Templates/PyramisResources/
partialRootPath = EXT:tx_pyramisresources/Resources/Private/Partials/
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/templates/conf/conf_general/includes.txt">
allWrap.dataWrap = <li id="page-{field:uid}">|</li>
tvlib.image = IMAGE
tvlib.image {
file.import = uploads/media/
file.import {
data = levelfield : -1, media, slide
listNum = 0
}
altText = This is the banner alt text
stdWrap.wrap = <div class="banner-wrap">|</div>
}