Skip to content

Instantly share code, notes, and snippets.

Avatar

André Tarnowsky lotterfriends

View GitHub Profile
View do sth with my svn mods
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 Aug 29, 2015
Flowplayer user agent test
View flowplayer-ua-tes.js
// 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 Apr 16, 2015
svn diff without whitespaces
View svn diff
svn diff -x -w FILE_NAME
@lotterfriends
lotterfriends / script.js
Last active Sep 18, 2015
default node script
View script.js
#!/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) {
View analog-clock.html
<!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;
}
View platform-service.js
'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 Oct 27, 2016
bash_profile für mac
View .bash_profile
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 Nov 6, 2016
install php5, php7, mysql, phpmyadmin with linux (ubunut 16 based systems and up)
View phpdevenv.sh
# 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
View platform-service.js
'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 Nov 1, 2017
portalfeatures
View bla.js
// 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 })