Skip to content

Instantly share code, notes, and snippets.

View weiland's full-sized avatar
🍫
🎓 && 💻 #GitHubDropICE

Pascal Weiland weiland

🍫
🎓 && 💻 #GitHubDropICE
View GitHub Profile
@weiland
weiland / chayns-confirm.js
Created September 8, 2014 12:04
Chayns confirm dialog box
(function (module, Chayns, undefined) {
'use strict';
module.confirm = function (question, yesCallback, noCallback) {
question = question || '';
yesCallback = yesCallback || Function.prototype;
noCallback = noCallback || Function.prototype;
@weiland
weiland / chayns-alert.js
Created September 8, 2014 12:05
Chayns Alert Popup Dialog
(function (module, Chayns, undefined) {
'use strict';
module.alert = function (message, cb) {
var buttons = [new Chayns.PopUpButton('OK', cb)];
Chayns.ShowPopUp(message, "", buttons);
};
})(window.TappProject, Chayns);
@weiland
weiland / chayns-debugger.js
Created September 8, 2014 12:10
Chayns Debugger
(function (Chayns, window, undefined) {
'use strict';
var lh = window.location.href;
function chooseOS(c) {
var osList = [
new Chayns.SelectOption('Normal', '', false),
@weiland
weiland / livereload.md
Last active August 29, 2015 14:06
Including Livereload without browser extension (e.g. CR9S)

Livereload without browser extension

make sure to install livereload globally on your system! \o/

npm install -g livereload`  

run livereload in your local directory or run a watch script

livereload = require('livereload');  
@weiland
weiland / README.md
Last active August 29, 2015 14:06
Quick Static Webserver in Node.js, Python, Ruby, PHP and IIS in case one has to run a server in a local directory.

Static Webserver Collection

@weiland
weiland / isTouch.js
Created September 24, 2014 12:55
simple touch detection in javascript
var isTouch = 'ontouchstart' in window;
@weiland
weiland / 3dSupport.js
Created September 24, 2014 12:56
check css 3d support
var support3d = 'WebKitCSSMatrix' in window || 'MozPerspective' in document.body.style;
@weiland
weiland / getBrowserPrefix.js
Created September 24, 2014 13:06
Get matching browser prefix for css.
function getBrowserPrefix( propName ) {
var prefixes = ['Moz','Webkit','ms']; // also O and Khtml
for ( var len = prefixes.length; len--; ) {
if( ( prefixes[len] + 'Transform' ) in document.body.style ) {
return '-' + prefixes[len].toLowerCase() + '-' + propName;
}
}
@weiland
weiland / README.md
Last active August 29, 2015 14:06
Set Spotify Pride Icon

Set Spotify Pride Icon

use the shell script or just the following command:

curl -o icon.icns https://dl.dropboxusercontent.com/content_link/heqIreR1Wns4PEo1N0DZEbxrBUBYi12tFOMJUJKGyPdHgGPbtoOFbmaGIQsWgfC3 && sudo cp ./icon.icns /Applications/Spotify.app/Contents/Resources/icon.icns
@weiland
weiland / angular-trusted-sce-filer.js
Created September 25, 2014 08:49
Angular Strict Contextual Escaping Service Provider as a filter
(function () {
function trusted($sce) {
return function (url) {
return $sce.trustAsResourceUrl(url);
};
}
trusted.$inject = ['$sce'];