Skip to content

Instantly share code, notes, and snippets.

@FilBot3
FilBot3 / python-zeep-example.md
Last active October 27, 2023 15:17
Python Zeep SOAP Example Write Up

Python Zeep SOAP Client

First, we'll look at the SOAP URL and see what Prefixes, Global Elements, Global Types, Bindings, and Services are provided by the SOAP Service.

You can do this by running zeep as a CLI tool.

export WSDL_URL="http://www.dneonline.com/calculator.asmx?WSDL"
python -m zeep $WSDL_URL
@jpentland
jpentland / tabc.sh
Last active February 9, 2023 20:00
Add or remove windows from suckless' tabbed
#!/bin/sh
# Usage:
# tabc.sh <tabbed-id> <command>
# Commands:
# add <window-id> - Add window to tabbed
# remove <window-id> - Remove window from tabbed
# list - List all clients of tabbed
#
@eugene-eeo
eugene-eeo / st-launch.sh
Last active November 2, 2020 13:33
lightweight rofi alternative
#!/bin/bash
GEOMETRY="80x20+570+300"
_st_fzf() {
fzf +m --tiebreak=length,end --layout=reverse --color=prompt:7,pointer:7,spinner:2,info:8,hl:2,hl+:2,marker:0 --margin=1,2 --prompt='∴ ' $@
}
_st_run() {
st -t 'st-launch' -a -g $GEOMETRY -e "$0" "$1" &
}
@sverweij
sverweij / highlight-graphviz-edge.html
Last active June 5, 2022 09:44
Highlight an edge in a graphviz generated svg
<!-- slap this somewhere at the top -->
<style>
/* the lines within the edges */
.edge:active path,
.edge:hover path {
stroke: fuchsia;
stroke-width: 3;
stroke-opacity: 1;
}
/* arrows are typically drawn with a polygon */
@Tomassito
Tomassito / download-file.js
Last active March 11, 2022 23:53 — forked from javilobo8/download-file.js
Download files with AJAX (axios)
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
link.click();
@sotoattanito
sotoattanito / roundoff.r
Last active November 5, 2021 22:26
Round half up in R.
round.off <- function (x, digits=0)
{
posneg = sign(x)
z = trunc(abs(x) * 10 ^ (digits + 1)) / 10
z = floor(z * posneg + 0.5) / 10 ^ digits
return(z)
}
@97-109-107
97-109-107 / vim_cterm2gui.py
Created June 23, 2015 08:22
convert from ctermfg/ctermbg to guifg/guibg
#!/usr/bin/env python2.7
#based on https://gist.github.com/hhatto/6405956 from hhato
import sys
new_vim_color = []
xtermMap = {
'0': '#000000', '1': '#800000', '2': '#008000', '3': '#808000', '4': '#000080',
'5': '#800080', '6': '#008080', '7': '#c0c0c0', '8': '#808080', '9': '#ff0000',
'10': '#00ff00', '11': '#ffff00', '12': '#0000ff', '13': '#ff00ff', '14': '#00ffff',
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active March 31, 2024 11:57
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@moregeek
moregeek / ferm.conf
Created November 26, 2013 08:35
Portknocking with ferm example
domain (ip) {
table filter {
#
# Subchains: Portknocking
# ################################################################################
chain PORT_KNOCKING_1 {
protocol tcp {
mod recent name "port_knock_seq_01" set NOP;
}
@jrus
jrus / lua-uuid.lua
Created July 29, 2012 09:26
quick lua implementation of "random" UUID
local random = math.random
local function uuid()
local template ='xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'
return string.gsub(template, '[xy]', function (c)
local v = (c == 'x') and random(0, 0xf) or random(8, 0xb)
return string.format('%x', v)
end)
end