Skip to content

Instantly share code, notes, and snippets.

View schmidt1024's full-sized avatar

Schmidt schmidt1024

View GitHub Profile
@schmidt1024
schmidt1024 / template-snippets.txt
Last active December 14, 2021 19:52
Template Snippets for Joomla!
# all php files :: disallow direct access of file
# between <?php and ?>
defined('_JEXEC') or die;
# index.php :: define variable with application
# between <?php and ?>
$app = JFactory::getApplication();
# index.php :: define variable with document
# between <?php and ?>
@schmidt1024
schmidt1024 / media-queries.css
Last active November 1, 2017 15:05
CSS Media Queries - Solo and Bootstrap way
/* Solo Queries
*********************************************/
/* Phones (portrait and landscape) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {}
/* Phones (landscape) */
@media only screen and (min-width: 321px) {}
/* Phones (portrait) */
@schmidt1024
schmidt1024 / zen-pricing-table.css
Last active October 13, 2015 17:57
html zen code of pricing table with three plans
div.prices>(div.plan$*3>div.inner>(div.caption+div.title+div.price+div.check*5+div.action))
@schmidt1024
schmidt1024 / images.php
Last active August 29, 2015 14:13
list all images of a folder with php
<?php
// list all images of a folder
$folder = 'images/';
$types = array('png','jpg','jpeg','gif');
$openfolder = opendir($folder);
while ($file = readdir($openfolder))
{
if( in_array(strtolower(substr($file,-3)),$types) OR
@schmidt1024
schmidt1024 / sublime-hotkeys.textile
Last active August 29, 2015 14:13 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

General

CTRL+P go to file
CTRL+R go to methods
CTRL+G go to line
CTRL+⇧+P package control
CTRL+⇧+N new window (useful for new project)
@schmidt1024
schmidt1024 / Simple-jQuery-Slider.markdown
Last active April 6, 2020 12:12
Simple jQuery Slider
@schmidt1024
schmidt1024 / Simple-jQuery-Fader.markdown
Last active August 29, 2015 14:14
Simple jQuery Fader
@schmidt1024
schmidt1024 / select100years
Last active August 29, 2015 14:14
select field for the last 100 years incl. age limit
<select>
<option>year</option>
<?php
$range = 100;
$limit = 18;
$current = date('Y');
$eldest = $current - $range;
$recent = $current - $limit;
foreach (range($recent, $eldest) as $year)
@schmidt1024
schmidt1024 / zip2city.js
Created February 9, 2015 10:16
autocomplete city based on zip code / Autovervollständigung Ort bzw. Stadt anhand Postleitzahl
$('#zip').blur(function() {
var city = $('#city');
if (!city.val()) {
$.getJSON('http://www.geonames.org/postalCodeLookupJSON?&country=DE&callback=?', {postalcode: this.value }, function(response) {
if (!city.val() && response && response.postalcodes.length && response.postalcodes[0].placeName) {
city.val(response.postalcodes[0].placeName);
}
})
}
});
@schmidt1024
schmidt1024 / jQuery-media-querie-like-css.html
Last active August 29, 2015 14:15
jQuery media query like css
<div id="smartphone">Smartphone</div>
<div id="tablett">Tablett</div>
<div id="desktop">Desktop</div>