Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@p3t3r67x0
p3t3r67x0 / hamburg_city_districts.geojson
Created December 4, 2018 23:01
Hamburg Germany multipolygon city districts geojson file.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@p3t3r67x0
p3t3r67x0 / get_server_cert.py
Last active June 2, 2021 08:08
Simple script to extract the server cert of a given domain
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import ssl
import OpenSSL
cert = ssl.get_server_certificate(('google.de', 443))
x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert)
print 'Expired: {}'.format(x509.has_expired())
@p3t3r67x0
p3t3r67x0 / rewe_discounter_details.json
Created March 31, 2021 18:34
List of probably all german listed REWE discounters with address data as well as contact data.
This file has been truncated, but you can view the full file.
{"marketManager": "Daniela Fischer", "phone": "036452-762538", "advertisingCounty": null, "regionShort": "OS", "address": {"street": "Schwerstedter Str.", "houseNumber": "3-4", "postalCode": "99439", "city": "Am Ettersberg OT Berlstedt", "state": "Th\u00fcringen", "streetWithNumber": "Schwerstedter Str. 3-4"}, "type": {"name": "REWE", "id": null}, "openingHours": {"condensed": [{"days": "Mo-Fr", "hours": "06:00 - 22:00"}, {"days": "Sa", "hours": "07:00 - 20:00"}], "dayAndTimeRanges": [{"startDay": "MONDAY", "endDay": "FRIDAY", "startTime": {"hour": 6, "minute": 0, "second": 0, "nano": 0}, "endTime": {"hour": 22, "minute": 0, "second": 0, "nano": 0}, "seoRepresentation": "Mo-Fr 06:00-22:00", "opens": "06:00", "closes": "22:00"}, {"startDay": "SATURDAY", "endDay": null, "startTime": {"hour": 7, "minute": 0, "second": 0, "nano": 0}, "endTime": {"hour": 20, "minute": 0, "second": 0, "nano": 0}, "seoRepresentation": "Sa 07:00-20:00", "opens": "07:00", "closes": "20:00"}]}, "specialOpeningHours": null, "geoLocation
0
000
01
010
02
03
080
09
1
10
@p3t3r67x0
p3t3r67x0 / prefixed-properties.md
Last active October 31, 2020 15:16
Be aware that every rendering engine has its own implementation of prefixed properties. As extensions are made part of the standard, the unprefixed identifier is then substituted.

Prefixed style properties

-ms-accelerator

The -ms-accelerator property sets or retrieves a string that indicates whether the object represents a keyboard shortcut.

-ms-accelerator: false | true
@p3t3r67x0
p3t3r67x0 / vue_tailwindcss_candar.vue
Created October 13, 2020 11:23
Simple Vue Tailwindcss Calendar with Modal
<template>
<div>
<div class="bg-white rounded shadow overflow-hidden">
<div class="flex items-center justify-between py-2 px-6">
<div>
<span class="text-lg font-bold text-gray-800">{{ monthNames[month] }}</span>
<span class="ml-1 text-lg text-gray-600 font-normal">{{ year }}</span>
</div>
<div class="border rounded-lg px-1" style="padding-top: 2px;">
<button type="button" class="leading-none rounded-lg transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 items-center" :class="{'cursor-not-allowed opacity-25': month == 0 }"
@p3t3r67x0
p3t3r67x0 / fulltext_idx.json
Last active September 18, 2020 13:07
curl -u admin:password -XPUT http://127.0.0.1:8094/api/index/fulltext_idx -H 'cache-control: no-cache' -H 'content-type: application/json' -d "$(cat fulltext_idx.json)"
{
"type": "fulltext-index",
"name": "fulltext_idx",
"sourceType": "couchbase",
"sourceName": "leakz",
"planParams": {
"maxPartitionsPerPIndex": 171,
"indexPartitions": 6
},
"params": {
CREATE INDEX `md5_idx` ON `leakz`(`md5`);
CREATE INDEX `sha1_idx` ON `leakz`(`sha1`);
CREATE INDEX `sha224_idx` ON `leakz`(`sha224`);
CREATE INDEX `sha256_idx` ON `leakz`(`sha256`);
CREATE INDEX `sha384_idx` ON `leakz`(`sha384`);
CREATE INDEX `sha512_idx` ON `leakz`(`sha512`);
CREATE PRIMARY INDEX `primary_idx` ON `leakz`;
@p3t3r67x0
p3t3r67x0 / tensorflow2.3_build_error.md
Last active September 13, 2020 07:05
A short story how I did build Tensorflow 2.3 from source on Ubuntu 20.4.1 LTS with CUDA 11.0.207

Building Tensorflow 2.3 from source on Ubuntu 20.4.1 LTS

GPU

ASUS ROG Strix GeForce GTX 1070 Ti 8GB

System

@p3t3r67x0
p3t3r67x0 / hashcat_benchmark.md
Created September 13, 2020 01:05
GeForce GTX 1070 Ti - hashcat benchmark on Ubuntu 20.04 with CUDA 11

hashcat --benchmark --optimized-kernel-enable

hashcat (v6.1.1) starting in benchmark mode...

CUDA API (CUDA 11.0)
====================
* Device #1: GeForce GTX 1070 Ti, 7730/8118 MB, 19MCU

OpenCL API (OpenCL 1.2 CUDA 11.0.228) - Platform #1 [NVIDIA Corporation]