Skip to content

Instantly share code, notes, and snippets.

@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
}
},
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 / hash
Last active July 31, 2017 12:00
0x943ac38Df09B787F6ae2F8A70e04e2a12c7D2e79
@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):
This file has been truncated, but you can view the full file.
[
{
"height": "44",
"polygon": [
[
[
13.3727382,
52.5103599
],
[