Skip to content

Instantly share code, notes, and snippets.

@orjanv
orjanv / gist:f05033316e96cde2b510
Last active September 12, 2019 02:12
Convert swf to gif
swfrender -o out.png fig_1853.swf
mogrify -resample 72x72 -resize 256x256 *.png
convert -delay 100 -loop 1 out-*.png animation.gif
convert -delay 10 -loop 1 -background white -alpha remove -layers OptimizePlus out-*.png animation.gif
convert \
-delay 10 \
$(for i in $(seq 0 5 100); do echo foo${i}.png; done) \
-loop 0 \
1. No way of reusing task output in main play.
2. Cannot specify multiple fail_when statements.
3. [*] A play is atomic, i.e. I can't take the output from a command, parse its json then act on it. I need to create an intermediary fact containing the json dict then use that in another play. It's tedious.
4. If you're missing a variable in a variable file, Ansible won't fail to parse it. It will just tell you "VARIABLE IS NOT DEFINED!," which is ambiguous
5. Doing anything "complicated" (like looping within a loop for deeply nested Ansible variables) is right out.
6. selectattr doesn't actually do what you think it does!
7. Missing vars within tasks or roles can lead to very very VERY cryptic errors
8. So you can't set booleans with set_facts without casting......... https://github.com/ansible/ansible/issues/5463
9. It would be great if I could say something like:
@nma-io
nma-io / Security_Docker_101.md
Last active August 26, 2020 00:48
A quick guide to deploying some Security Docker Containers.

Install

Grab a copy of Docker for your platform here: https://www.docker.com/community-edition#/download Follow the installation guide and tune the docker system to run with as much memory and CPU as you're willing to feed to it.

Docker Containers I find useful for general security tasks:

Local Debian instance: debian:latest

Metasploit: remnux/metasploit

@rememberlenny
rememberlenny / vanilla.js
Last active April 21, 2021 21:30
How to post to Google docs using a jQuery ajax POST request
// url is the link for the form view page
// data is the name attribute of the field
$.ajax({
url: "https://docs.google.com/forms/d/1iqMixtVq4O0AFvYCZHbGerigi1G5Qb3XthXZX9VpNtk/formResponse",
data: { "entry.1679407376": field1},
type: "POST",
dataType: "xml",
statusCode: {
@rcmorano
rcmorano / docker-registry-expect-scripted-login
Created March 29, 2017 09:52
expect script to interact with "docker login"
#!/bin/bash
#DOCKER_REGISTRY_URI=_DOCKER_REGISTRY_URI_
#DOCKER_REGISTRY_USER=_DOCKER_REGISTRY_USER_
#DOCKER_REGISTRY_PASS=_DOCKER_REGISTRY_PASS_
expect <<EOF
spawn docker login -u $DOCKER_REGISTRY_USER $DOCKER_REGISTRY_URI
while (1) {
expect {
@sduff
sduff / ccloud-resource-identifiers-after-terraform.txt
Created October 6, 2021 06:29
Accessing Confluent Cloud resource identifiers after running the terraform provider
# Use jq to read the terraform state file
# all id's
jq '.resources[].instances[].attributes.id?' terraform.tfstate
# all display names
jq '.resources[].instances[].attributes.display_name?' terraform.tfstate
# all environment id's
jq '.resources[].instances[].attributes.environment[]?.id'
@halr9000
halr9000 / README.md
Last active February 27, 2022 05:00
How to make fake data in Splunk using SPL

How to make fake data in Splunk using SPL

Sometimes, you need to fake something in Splunk. Might be during development and you don't feel like writing a real search, but you really need a number for a dashboard panel to look right. Maybe you are helping someone with a hairy regex, and you don't want to index data just to test it on your instance. Whatever the reason, here are some searches that have helped me out.

Note that when using these techniques, you are not going through the indexing

@bakkujp
bakkujp / Install_Docker_On_Alpine_Linux_3.10.md
Last active May 21, 2022 18:23
How to install Docker on Alpine Linux 3.10
<Sysmon schemaversion="4.32">
<!-- Capture all hashes -->
<HashAlgorithms>*</HashAlgorithms>
<DnsLookup>False</DnsLookup>
<ArchiveDirectory>Archive</ArchiveDirectory>
<EventFiltering>
<RuleGroup name="" groupRelation="or">
<!-- Event ID 1 == Process Creation. Log all newly created processes except -->
<ProcessCreate onmatch="exclude">
<Image condition="contains">splunk</Image>
@will-hart
will-hart / build.py
Last active January 26, 2023 12:35
Super Simple Static Site Generator (Python)
"""
Free to use under the MIT license
Builds a static site from a list of Markdown source files. The source
files should have the same directory structure as the desired output.
Files are rendered using Markdown2 and can declare metadata variables:
---