Skip to content

Instantly share code, notes, and snippets.

View martinwolf's full-sized avatar
🐺

Martin Wolf martinwolf

🐺
View GitHub Profile
" .VIMRC
set nocompatible " This should be the first line. It sets vim to not be backwards compatible with vi.
set encoding=utf-8 " Encoding
" VUNDLE PLUGINS
filetype off
@martinwolf
martinwolf / gulpfile.js
Created February 27, 2015 09:30
Jekyll, Browsersync and Gulp
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
clean = require('gulp-clean'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
@martinwolf
martinwolf / horrido.css
Created January 18, 2015 10:03
Shout Custom Theme
#chat, #windows .header {
font-size: 14px;
line-height: 1.6;
}
#chat .self .text {
color: #666;
}
@media (max-width: 479px) {
$('#js_go-top').on('click', function(e) {
$('html, body').animate({
scrollTop: 0
}, 'slow');
e.preventDefault();
});
gulp.task('js', function() {
gulp.src('./js/scripts.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(addsrc('./js/_libs/*.js'))
.pipe(order([
'js/_libs/jquery-2.1.1.js',
'js/_libs/jquery.bxslider.js',
'js/_libs/jquery.form.js',
'js/_libs/cf7.js',
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
rename = require('gulp-rename'),
cssmin = require('gulp-cssmin'),
jshint = require('gulp-jshint'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
addsrc = require('gulp-add-src'),
watch = require('gulp-watch'),
@martinwolf
martinwolf / play-yt-video.html
Last active August 26, 2019 14:59
JS: Play embedded YouTube Video on click
<a id="play-video" href="#">Play Video</a>
<iframe id="video" width="420" height="315" src="//www.youtube.com/embed/9B7te184ZpQ?rel=0" frameborder="0" allowfullscreen></iframe>
@martinwolf
martinwolf / click-toggle-thingy.js
Last active December 23, 2015 19:49
Click Toggle Thingy
/* General Click Toggle */
$('[data-click-ref]').on('click', function(ev) {
var clickRef = $( $(this).data('click-ref') );
if ( clickRef.data('clicked-from') ) {
// If clickRef was already opened once
var clickedFrom = clickRef.data('clicked-from');
if ( clickedFrom === $(this) ) {
@martinwolf
martinwolf / _radio-and-checkbox-inputs.scss
Last active August 10, 2023 23:17
SCSS: Pure CSS radio and checkbox inputs
.input-helper {
position: relative;
display: inline-block;
&:before {
content: '';
display: block;
position: absolute;
}
}
@martinwolf
martinwolf / if-touch.js
Created June 19, 2013 07:39
JS: Detect if touch device
if ( ('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) ) {
// is touch
}