Skip to content

Instantly share code, notes, and snippets.

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

Sebastian Sebald sebald

☀️
^⨀ᴥ⨀^
View GitHub Profile
@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>
@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 / 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 / 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;
}
'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 / 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
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';
this.state$ = Observable
.create((observer:any) => {
this.store.subscribe(() => observer.next(this.store.getState()));
})
.startWith(this.store.getState());
@sebald
sebald / docker.sh
Last active August 19, 2016 13:53
# Remove all stopped containers.
function docker-stop () {
if [[ $(docker ps -a -q) ]]; then
docker rm $(docker ps -a -q)
echo -e "\xf0\x9f\x93\xa6 ➡ \xf0\x9f\x92\xa5 All stoped containers removed!"
else
echo -e "\xf0\x9f\x91\x8c Nothing to stop!"
fi
}