Skip to content

Instantly share code, notes, and snippets.

View alfredbez's full-sized avatar
👨‍💻

Alfred Bez alfredbez

👨‍💻
View GitHub Profile
@alfredbez
alfredbez / text-shadow.css
Created December 17, 2013 07:51
doppelter Schatteneffekt für Texte
h3 a {
text-decoration: none;
color: #000;
text-shadow: 0.15rem 0.15rem 0 #fbfbfb,0.35rem 0.35rem 0 #dadada;
border: none;
}
@alfredbez
alfredbez / gulpfile.js
Created February 18, 2014 11:53
gulp: livereload basic setup
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var prefix = require('gulp-autoprefixer');
var livereload = require('gulp-livereload');
var watch = require('gulp-watch');
gulp.task('default', function () {
gulp.src('sass/app.scss')
.pipe(watch())
.pipe(sass({style: 'compact'}))
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
CoffeeScript: source.coffee
@alfredbez
alfredbez / windows-symlink.txt
Created February 26, 2014 12:00
windows symlink
@alfredbez
alfredbez / accessible.js
Last active August 29, 2015 14:01
Prüft Bilder auf nicht vorhandene und leere ALT-Tags und Links auf nicht vorhandene und leere TITLE-Tags
var bilderOhneAltTag = jQuery('img:not([alt])'),
bilderMitLeeremAltTag = jQuery('img[alt=""]'),
linksOhneTitleTag = jQuery('a:not([title])'),
linksMitLeeremTitleTag = jQuery('a[title=""]');
console.log('Bilder ohne alt-Tag: ' + bilderOhneAltTag.length);
if(bilderOhneAltTag.length > 0){
console.log(bilderOhneAltTag);
}
console.log('Bilder mit leerem alt-Tag: ' + bilderMitLeeremAltTag.length);
if(bilderMitLeeremAltTag.length > 0){
@alfredbez
alfredbez / livereload.sublime-snippet
Created June 4, 2014 09:19
Sublime Text Snippet: Livereload
<snippet>
<content><![CDATA[
<script src="http://localhost:35729/livereload.js"></script>
]]></content>
<tabTrigger>lr</tabTrigger>
<scope>text.html(.basic)</scope>
</snippet>
@alfredbez
alfredbez / load-repo.php
Created June 11, 2014 12:42
Lädt und entpackt Github Repo
<?php
set_time_limit(0);
file_put_contents("tmp/download-module.zip", fopen("https://github.com/author/repo/archive/master.zip", 'r'));
$zip = new ZipArchive;
$res = $zip->open('tmp/download-module.zip');
if ($res === TRUE) {
$zip->extractTo('modules/');
$zip->close();
}
?>
@alfredbez
alfredbez / backup.webspace+databse.txt
Created September 19, 2014 07:17
backup Webspace + Database
tar -zcvf ZIELDATEINAME.tar.gz VERZEICHNISNAME
mysqldump -h HOSTNAME -u USERNAME -pPASSWORT ALTERDATENBANKNAME > backup.sql
@alfredbez
alfredbez / deleteSpecificLocalStorage.js
Created October 8, 2014 10:40
cleares localStorage if key begins with specific string
var pattern = 'http://www.domain.com/section/';
for (var key in localStorage){
if(key.substr(0,pattern.length) === pattern){
localStorage.removeItem(key);
console.log('localStorage: cleared key "' + key + '"');
}
}

using multiple Arrays in gulp.src

var gulp = require('gulp');

gulp.task('build', function() {
    var srcFiles = ['file1.js', 'file2.js'],
        otherSrcFiles = ['file3.js', 'file4.js'];
    gulp.src(srcFiles.concat(otherSrcFiles));
});