Skip to content

Instantly share code, notes, and snippets.

@function black($opacity) {
@return rgba(0,0,0,$opacity);
};
@function white($opacity) {
@return rgba(255,255,255,$opacity);
};
<?xml version="1.0"?>
<root>
<devicevendordef>
<vendorname>daskeyboard</vendorname>
<vendorid>0x04d9</vendorid>
</devicevendordef>
<deviceproductdef>
<productname>daskeyboard</productname>
<productid>0x2013</productid>
<?xml version="1.0"?>
<root>
<!--
# Declare hardware devices
-->
<devicevendordef>
<vendorname>daskeyboard</vendorname>
<vendorid>0x04d9</vendorid>
</devicevendordef>
@kyranjamie
kyranjamie / gist:1c48427caa121ca8a947
Created May 7, 2014 08:42
there you go, watkins
<?xml version="1.0"?>
<root>
<!--
# Declare hardware devices
-->
<devicevendordef>
<vendorname>daskeyboard</vendorname>
<vendorid>0x04d9</vendorid>
</devicevendordef>
- request:
url: /hello
response:
body: ':)'
- request:
url: /give/me/a/smile
response:
status: 200
body: >
{"status": "hello world with single quote"}
gulp.task('scripts:dev', ['templates'], function() {
return gulp.src(paths.scripts)
.pipe(plumber())
.pipe(concat('app.js'))
.pipe(ngmin())
.on('error', notify.onError())
.pipe(gulp.dest('public/dist/js'))
.pipe(refresh(lrserver));
});
# Git
alias g="git"
alias commits="git shortlog -sn"
alias gl="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"
alias gs="git status"
alias ga="git add"
alias gc="git commit -m"
alias gp="git push"
alias gpl="git pull"
alias gd="git diff"
@kyranjamie
kyranjamie / js - calc input
Created May 10, 2012 16:34
jQuery - Calculate inputs
var week = $('.week');
var month= $('.month');
var year = $('.year');
function weekCalc(sender, args) {
var value = sender.val();
var milesPerMonth = value * 4.35;
var milesPerYear = value * 52;
@kyranjamie
kyranjamie / gist:4988916
Last active December 13, 2015 22:59
ASP.NET - Remove www prefix with 301 redirect to root domain.
<rewrite>
<rules>
<rule name="Remove WWW prefix" >
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.domainname\.co.uk" />
</conditions>
<action type="Redirect" url="http://domainname.co.uk/{R:1}" redirectType="Permanent" />
</rule>
</rules>
@kyranjamie
kyranjamie / gist:5104476
Last active December 14, 2015 14:59
ASP.NET enable SVG images Azure, to be put in system.webServer.
<staticContent>
<remove fileExtension=".mp4"/>
<remove fileExtension=".ogv"/>
<remove fileExtension=".webm"/>
<remove fileExtension=".svg"/>
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
<mimeMap fileExtension=".ogv" mimeType="video/ogg" />
<mimeMap fileExtension=".webm" mimeType="video/webm" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml"/>
</staticContent>