This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------------------------------------------------- | |
// @author standa | 2014-04-30 | Swiss Rechnung (BESR) | |
// not guaranteed 100% but seems to work for us | |
public function calculateCheckDigit($number) | |
{ | |
$matrix = array( | |
0 => array(0,9,4,6,8,2,7,1,3,5), | |
1 => array(9,4,6,8,2,7,1,3,5,0), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tail -f /var/log/nginx/error.log -f /www/var/log/exception.log -f /www/var/log/system.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
// Upload as .git/hooks/post-commit | |
mail( | |
'standa@example.com',. | |
implode(' ', array('[GIT]', trim(`hostname`), ' ', trim(`git log -n 1 --oneline`))), | |
`git log -n 1`, | |
implode(' ', array('From:', trim(`hostname`), 'git <standa@example.com>')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('session.cookie_lifetime', 86400); | |
ini_set('session.gc_maxlifetime', 86400); | |
session_set_cookie_params(86400, dirname($_SERVER['REQUEST_URI'])); | |
session_start(); | |
require 'vendor/autoload.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This script creates a custom category attribute 'H1 Test' | |
* | |
* @link http://fabrizioballiano.net/2012/02/08/create-a-custom-category-attribute-in-magento/ | |
* | |
* @author Standa | |
* @version 2015-02-12 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends '@YourWhateverNameYouUseBundle/layout.html.twig' %} | |
{% block body %} | |
<button class="btn">Hello {{ name }}!</button> | |
{# example: use for regular assets somewhere deep in your javascripts #} | |
{# assets:install --env=... has to be run beforehand #} | |
<script type="text/javascript" src="{{ asset('bundles/yourwhatevernameyouusebundle/js/ckeditor/ckeditor.js') }}"></script> | |
{% endblock body %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"routes" : [ | |
{ | |
"bounds" : { | |
"northeast" : { | |
"lat" : 4.3561, | |
"lng" : 1.01389 | |
}, | |
"southwest" : { | |
"lat" : 9.293703, |