Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
[
{
"height": "44",
"polygon": [
[
[
13.3727382,
52.5103599
],
[
@awdng
awdng / dirwalk.py
Last active October 26, 2017 11:56
The goal is to walk through all dirs and subdirs from a given path (as parameter) and show all subdirs and files recursively. For all files compute an md5 hash and show it. Catch exceptions.
import sys, os
import hashlib
color_white = '\033[0;0m'
color_green = '\033[0;32m'
base_path = os.path.dirname(os.path.realpath(sys.argv[0]))
cli_path = sys.argv[1]
def dirwalk(base, relpath):
@awdng
awdng / hash
Last active July 31, 2017 12:00
0x943ac38Df09B787F6ae2F8A70e04e2a12c7D2e79
angular.module('company').controller('CompanyProfileCtrl', function($scope, $routeParams, Restangular, ngTableParams, $filter, $location, $q, $upload, formBuilderApi) {
var app = angular.module('app');
var init = function() {
Restangular.one('companies/' + global_company_id).get().then(function (company) {
// bind the company model data to the form
$scope.companyForm.bindFormData(company);
@awdng
awdng / es.json
Created December 15, 2015 16:35
elasticsearch query built by elastica 2.x
{
"query": {
"function_score": {
"query": {
"filtered": {
"query": {
"bool": {
"minimum_number_should_match": 0
}
},
# CMF/CMS related stuff
doctrine_phpcr:
session:
backend:
type: doctrinedbal
workspace: default
odm:
auto_mapping: true
sonata_block:
{
"pagination_data": {
"last": 2,
"current": 1,
"numItemsPerPage": 10,
"first": 1,
"pageCount": 2,
"totalCount": 18,
"pageRange": 2,
"startPage": 1,
/* In-Tab sidebar */
.tab_sidebar{/*margin-left:-100%*/float:left;position:relative; background-color: #ffffff;width: 246px; margin-left: 1px;}
.tab_sidebar_sep{background:#efefef;clear:both;float:none;height:5px;border-color:#ccc;border-style:solid;border-width:1px 0;margin:14px 0}
.tab_sidebar_switch{cursor:pointer;z-index:100;}
.on_switch {background: transparent;}
.off_switch {background: transparent;}
.tab_sidebar_inner {margin-left: 15px;margin-top: 50px;}
.tab_sidebar_inner form{padding:14px 0 9px 15px}
.tab_sidebar_inner form input{margin:0}
Create new concept / template:
- The name I enter here is the same name/title as I have to enter again in the concept edit-mode page - can this be prefilled then?
PREVIEW-MODE SCREEN
$builder
->add('subject', 'text')
->add('message', 'textarea')
;
// ist das gleiche wie
$builder->add('subject', 'text')->add('message', 'textarea');
// oder
$builder->add('subject', 'text');