Skip to content

Instantly share code, notes, and snippets.

View sebald's full-sized avatar
☀️
^⨀ᴥ⨀^

Sebastian Sebald sebald

☀️
^⨀ᴥ⨀^
View GitHub Profile
import path from 'path';
import webpack from 'webpack';
import BrowserSyncPlugin from 'browser-sync-webpack-plugin';
import ExtractTextPlugin from 'extract-text-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import bourbon from 'node-bourbon';
import argv from './gulp/argv';
@sebald
sebald / osx.ahk
Last active September 23, 2015 14:17
Autohotkey Script to have OSX-like Keyboard Shortcuts on Windows. User in conjunction with https://github.com/samartzidis/WinA1314 (makes FN key work!)
; CMD+TAB -> Application Switching
<#Tab::AltTab
!Tab::return
; Remap <> and ^°
;SC029::Send {<}
;+SC029::Send {>}
;$<::Send {^}
;+$<::Send {°} ;doesnt work
'use strcit';
var gulp = require('gulp'),
ts = require('gulp-typescript'),
sourcemaps = require('gulp-sourcemaps'),
concat = require('gulp-concat'),
browserSync = require('browser-sync'),
reload = browserSync.reload,
@sebald
sebald / event-bubbling.html
Created July 30, 2014 10:06
Tinkering with ShadowDOM
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ShadowDOM Events</title>
<style>
div {
box-sizing: border-box;
}
@sebald
sebald / jsbin.gowup.html
Created July 9, 2014 12:47
Testing Angular directive replaceWith
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body ng-app="mine">
<div ng-controller="myCtrl as ctrl">
<my class="red" ng-click="increment()"></my>
@sebald
sebald / richResource.js
Created February 14, 2014 08:16
Angular: Transform Resources
$httpBackend.expect('GET', '/Customer/1', null).respond({
id: 1,
name: 'John Doe',
age: 42,
purchases: [
{
id: 1,
items: [
{ name: 'Shampoo' },
{ name: 'Soap' }
@sebald
sebald / NewTest.sublime-snippet
Created February 6, 2014 14:12
Sublime Text Snippet to insert a new Jasmine test.
<snippet>
<content><![CDATA[
/** @requirement missing */
it('$1', function () {
$2
});
]]></content>
<tabTrigger>it</tabTrigger>
<scope>source.js</scope>
<description>Insert New Test</description>
<snippet>
<content><![CDATA[
/** @requirement ${1:missing} */
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>hello</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
<description>Insert Requirements Comment</description>
</snippet>
@sebald
sebald / breakpoint-mixin
Last active January 2, 2016 11:39
Lazy breakpoints and IE8 fallback for SCSS.
// Vars (I put these in a _globals.scss with all my other variables)
// ------------------------
$breakpointTiny: 580;
$breakpointSmall: 790;
$breakpointNormal: 1200;
// Breakpoint Mixin
// ------------------------
$oldie: false !default;
@sebald
sebald / gist:7917136
Last active December 31, 2015 01:49 — forked from dmajda/gist:7688943
Content =
all:(Element / Text)* {
return all.join("").replace(/\n$/, '');
}
Element =
startTag:StartTag content:Content endTag:EndTag {
if (startTag != endTag) {
throw new Error(
"Expected </" + startTag + "> but </" + endTag + "> found."