Skip to content

Instantly share code, notes, and snippets.

Avatar
🐺

Martin Wolf martinwolf

🐺
View GitHub Profile
View .vimrc
" .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 Feb 27, 2015
Jekyll, Browsersync and Gulp
View gulpfile.js
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 Jan 18, 2015
Shout Custom Theme
View horrido.css
#chat, #windows .header {
font-size: 14px;
line-height: 1.6;
}
#chat .self .text {
color: #666;
}
@media (max-width: 479px) {
View go-top.js
$('#js_go-top').on('click', function(e) {
$('html, body').animate({
scrollTop: 0
}, 'slow');
e.preventDefault();
});
View gulp-js-task.js
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',
View gulpfile.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 Aug 26, 2019
JS: Play embedded YouTube Video on click
View play-yt-video.html
<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>
View click-toggle-thingy.js
/* 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 May 16, 2019
SCSS: Pure CSS radio and checkbox inputs
View _radio-and-checkbox-inputs.scss
.input-helper {
position: relative;
display: inline-block;
&:before {
content: '';
display: block;
position: absolute;
}
}
@martinwolf
martinwolf / if-touch.js
Created Jun 19, 2013
JS: Detect if touch device
View if-touch.js
if ( ('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0) ) {
// is touch
}