Skip to content

Instantly share code, notes, and snippets.

View michsch's full-sized avatar

Michael Schulze michsch

View GitHub Profile
@michsch
michsch / condition.haml
Created March 10, 2015 18:00
Test case for RuboCop Style/EmptyElse warning
- if Rails.env == 'development'
:css
.jw-non-functional {
box-shadow: 0 0 6px 4px rgba(255, 127, 80, .6);
}
- else
:css
.jw-non-functional {
display: none;
}
@michsch
michsch / dabblet.css
Created February 17, 2015 19:22
box-shadow vs filter: drop-shadow
/**
* box-shadow vs filter: drop-shadow
*/
body {
background: #aaa;
font: 16px/1 sans-serif;
}
div {
margin: 100px;
@michsch
michsch / xhr.coffee
Last active August 29, 2015 14:15
Cross Browser XML HTTP Request (AJAX)
###
* Cross Browser XML HTTP Request
* https://stackoverflow.com/questions/2557247/easiest-way-to-retrieve-cross-browser-xmlhttprequest
*
* Gist: https://gist.github.com/michsch/acf8d51039e078f8fe07
###
### global
ActiveXObject,
define,
@michsch
michsch / .gitconfig
Last active September 4, 2019 12:15
GIT alias
[alias]
co = checkout
br = branch
ci = commit
st = status
unstage = reset HEAD --
last = log -1 HEAD
graph = log --graph
amsi = commit --amend --signoff
amend = commit --amend
@michsch
michsch / getSCSSFromCSS.js
Last active August 29, 2015 14:05
Grunt configuration to copy CSS files and change the filename extension to SCSS.
/**
* http://gotofritz.net/blog/geekery/rename-files-while-copying-grunt/
*/
module.exports = function( grunt ) {
"use strict";
grunt.initConfig({
//copy all css files to sass directory, and rename to .scss
copy: {
@michsch
michsch / YAML Emmet
Last active August 29, 2015 13:56 — forked from jensgro/gist:7719515
/*========= Columns =================== */
/* col1 / col2 / col3 */
.ym-column>(.ym-col1>.ym-cbox-left)+(.ym-col2>.ym-cbox)+(.ym-col3>.ym-cbox-right>.ym-ie-clearing)
/* col1 / col3 / col2 */
.ym-column>(.ym-col1>.ym-cbox-left)+(.ym-col3>.ym-cbox>.ym-ie-clearing)+(.ym-col2>.ym-cbox-right)
/* col2 / col3 / col1 */
.ym-column>(.ym-col2>.ym-cbox-left)+(.ym-col3>.ym-cbox>.ym-ie-clearing)+(.ym-col1>.ym-cbox-right)
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->
@michsch
michsch / baseurl.ts
Last active December 18, 2015 19:09
#### Aktivierung RealURL ####
config {
baseURL = http://domain.com/
tx_realurl_enable = 1
prefixLocalAnchors = all
notification_email_urlmode = all
}
#### Aktivierung RealURL ####
#Base-URL-Fix für IE6 Fehler "Vorgang abgebrochen"
@michsch
michsch / Gruntfile.js
Last active December 18, 2015 04:59
Sass Source Maps in Google Chrome 27 (stable) or Chrome Canary (29)
module.exports = function(grunt) {
"use strict";
grunt.initConfig({
sass : {
dev : {
options : {
sassFolder : 'sass',
cssFolder : 'dev',
sourcemap : true,
/**
* original found here: http://stackoverflow.com/questions/7264899/detect-css-transitions-using-javascript-and-without-modernizr
*/
var featureDetection = ( function( exports, root, document ) {
"use strict";
exports.transition = function() {
var body, bodyStyle, feature, prefix;
body = document.body || document.documentElement;