Skip to content

Instantly share code, notes, and snippets.

View lotterfriends's full-sized avatar

André Tarnowsky lotterfriends

View GitHub Profile
svn stat | grep -r "^M" | sed -r 's/^M\s*//g' | while read line; do echo $line; done
@lotterfriends
lotterfriends / flowplayer-ua-tes.js
Last active August 29, 2015 14:18
Flowplayer user agent test
// run with rhino, io.js or node
function parseIpadVersion(UA) {
var e = /Version\/(\d\.\d)/.exec(UA);
if (e && e.length > 1) {
return parseFloat(e[1], 10);
}
return 0;
}
@lotterfriends
lotterfriends / svn diff
Created April 16, 2015 14:19
svn diff without whitespaces
svn diff -x -w FILE_NAME
@lotterfriends
lotterfriends / script.js
Last active September 18, 2015 09:43
default node script
#!/usr/bin/env node
require('shelljs/global');
var when = require('when');
var pipeline = require('when/pipeline');
var colors = require('colors');
var debug = false;
function runCommand(command) {
<!DOCTYPE html>
<html>
<head>
<title></title>
<link href='https://fonts.googleapis.com/css?family=Roboto:700' rel='stylesheet' type='text/css'>
<style type="text/css">
body {
font-size: 14px;
}
@lotterfriends
lotterfriends / platform-service.js
Created September 21, 2016 12:43
ionic view issue 29
'use strict';
(function() {
angular.module('app.services').service('platformService', [
function() {
var IONIC_APP_ID = 'xxx00xxx';
this.isIonicWebView = function() {
return window.location.href.indexOf('com.ionic.viewapp') > -1 || window.location.href.indexOf(IONIC_APP_ID) > -1;
@lotterfriends
lotterfriends / .bash_profile
Created October 27, 2016 10:48
bash_profile für mac
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ls='ls -GFh'
@lotterfriends
lotterfriends / phpdevenv.sh
Last active November 6, 2016 17:14
install php5, php7, mysql, phpmyadmin with linux (ubunut 16 based systems and up)
# apache
sudo apt-get install apache2 apache2-doc
# header module
sudo a2enmod headers
# rewrite module
sudo a2enmod rewrite
# php
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0
@lotterfriends
lotterfriends / platform-service.js
Created September 21, 2016 12:43
ionic view issue 29
'use strict';
(function() {
angular.module('app.services').service('platformService', [
function() {
var IONIC_APP_ID = 'xxx00xxx';
this.isIonicWebView = function() {
return window.location.href.indexOf('com.ionic.viewapp') > -1 || window.location.href.indexOf(IONIC_APP_ID) > -1;
@lotterfriends
lotterfriends / bla.js
Last active November 1, 2017 14:55
portalfeatures
// export
x = []; $('.inputHost:checked').each(function(a,b) {x.push(b.value)}); console.log(x)
// import
x="Ausgabe von Export";x.forEach(function(a) { document.querySelector('.inputHost[value="'+a+'"]').checked = true })