Skip to content

Instantly share code, notes, and snippets.

{
"$ref": "#/definitions/Coredns",
"$schema": "http://json-schema.org/draft-06/schema#",
"definitions": {
"Coredns": {
"additionalProperties": false,
"properties": {
"affinity": {
"default": {
"affinity": {
curl -X POST -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:<SOAPACTION>" -d@<xml_payload> <url> > output.xml
python esptool.py --port COM3 write_flash -fs 1MB -fm dout 0x0 tosmota.bin
python esptool.py --port COM3 read_flash 0x00000 0x100000 sonoff_t1_backup.bin
@raglin
raglin / pom.xml
Created October 30, 2018 04:53
create jooq db objects from ddl
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.197</version>
</dependency>
</dependencies>
@raglin
raglin / xml_search_and_print.sh
Created October 25, 2018 04:36
find xml file, grep for tags and then print
#Will print from an xml file the values from 2 tags like value1: value2
find . -name *xml -exec xml_grep --cond '#SOME XPATH#' --cond '#SOME OTHER XPATH#' {} \; | awk 'NR%2{printf "%s: ",$0;next;}1'
@raglin
raglin / load_certs.txt
Last active January 13, 2025 12:26
setting certificates for node, aws, python
# CERTS for NODE
set NODE_EXTRA_CA_CERTS=[path to certs]
# CERTS for AWS CLI
set AWS_CA_BUNDLE=[path to certs]
# CERTS for Python
set REQUESTS_CA_BUNDLE=[path to certs]
@raglin
raglin / delete_aws_log_groups
Last active October 3, 2018 11:24
delete all aws log groups
aws logs describe-log-groups | jq '.logGroups[].logGroupName' | sed s/\"//g | while read line; do aws logs delete-log-group --log-group-name $line; done
## Powershell friendly
aws logs describe-log-groups --query 'logGroups[*].[logGroupName]' --output text | foreach { aws logs delete-log-group --log-group-name $_ }
@raglin
raglin / generate_clone_all_bitbucket_repos.sh
Last active August 15, 2018 08:02 — forked from eeichinger/generate_clone_all_bitbucket_repos.sh
script to clone all repositories in a bitbucket server (aka stash) project
# this script uses syntax for bitbucket server.
# For bitbucket cloud see https://confluence.atlassian.com/bitbucket/use-the-bitbucket-cloud-rest-apis-222724129.html
#
# Note: replace username, password and PROJECTNAME with your values
USERNAME=xxxx
PASSWORD=xxxx
PROJECTNAME=xxxxx
HOST=xxxxx