var gulp = require('gulp');
gulp.task('build', function() {
var srcFiles = ['file1.js', 'file2.js'],
otherSrcFiles = ['file3.js', 'file4.js'];
gulp.src(srcFiles.concat(otherSrcFiles));
});
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteCond %{HTTP:Accept-Encoding} gzip | |
| RewriteCond %{REQUEST_FILENAME}.gz -f | |
| RewriteRule (.*)$ $1.gz [L] | |
| </IfModule> | |
| <FilesMatch ".(js.gz)$"> | |
| AddType text/javascript .gz | |
| AddEncoding x-gzip .gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 + '"'); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tar -zcvf ZIELDATEINAME.tar.gz VERZEICHNISNAME | |
| mysqldump -h HOSTNAME -u USERNAME -pPASSWORT ALTERDATENBANKNAME > backup.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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(); | |
| } | |
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <snippet> | |
| <content><![CDATA[ | |
| <script src="http://localhost:35729/livereload.js"></script> | |
| ]]></content> | |
| <tabTrigger>lr</tabTrigger> | |
| <scope>text.html(.basic)</scope> | |
| </snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mklink /j "c:\symlink" "C:\path\to\link" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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'})) |