Skip to content

Instantly share code, notes, and snippets.

View schmidt1024's full-sized avatar

Schmidt schmidt1024

View GitHub Profile
@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-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>
@schmidt1024
schmidt1024 / index.html
Created February 23, 2015 12:58
search field animation
<div class="search">
<form action="" method="post" class="form-inline">
<img src="http://placehold.it/24x24" />
<input name="searchword" id="mod-search-searchword" maxlength="20" class="inputbox search-query" size="20" value="Suchen..." onblur="if (this.value=='') this.value='Suchen...';" onfocus="if (this.value=='Suchen...') this.value='';" type="text"> <input name="task" value="search" type="hidden">
<input name="option" value="com_search" type="hidden">
<input name="Itemid" value="143" type="hidden">
</form>
</div>
@schmidt1024
schmidt1024 / config.json
Last active August 29, 2015 14:16 — forked from anonymous/config.json
Bootstrap Customize Configuration
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@schmidt1024
schmidt1024 / button-with-ink-effect.markdown
Last active August 29, 2015 14:17
button with ink effect