Skip to content

Instantly share code, notes, and snippets.

@felixvd
felixvd / drawioGettext.py
Last active January 18, 2024 19:41
Read draw.io diagrams in Python and read/write text fields
#!/usr/bin/python3
# Provides gettext-like functionality for drawio files:
# - Extract translatable strings from drawio diagram files (svg, png, xml) to PO files
# - Replace translatable strings in drawio diagram file with translations from a PO file
# - Regenerate the diagram in another language
# Reads .drawio.svg or .drawio.xml file, prints (or modifies) the `value` fields of the diagram, then writes a new file.
# Only changes the metadata, not the SVG. Use drawio to generate the SVG from the new metadata, e.g.:
# drawio -x -e -f svg -o regenerated.drawio.svg changed.drawio.svg
@kenwebb
kenwebb / xholonWorkbook.xml
Last active November 25, 2021 01:47
Human Face Generator
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Fri Jan 27 2017 10:35:21 GMT-0500 (EST)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Human Face Generator
Description:
Url: http://www.primordion.com/Xholon/gwt/
@xem
xem / codegolf.md
Last active March 22, 2024 15:41
JS code golfing

codegolf JS

Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...

(For more info and other projects, visit http://xem.github.io)

(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)

@rogerleite
rogerleite / _install.md
Last active May 19, 2023 16:57
Some scripts to install things

Introduction

Some install scripts. Target to work with Ubuntu 12 or greater.

Table of Scripts

@nboubakr
nboubakr / subnet.py
Created December 20, 2012 11:23
A simple python script converts a Classless Inter-Domain Routing (CIDR)-formatted IP address into an IP range and netmask.
#!/usr/bin/env python
# python subnet.py 200.100.33.65/26
import sys
# Get address string and CIDR string from command line
(addrString, cidrString) = sys.argv[1].split('/')
# Split address into octets and turn CIDR into int
addr = addrString.split('.')
@stonith
stonith / curl
Last active March 13, 2017 13:04 — forked from nickethier/curl
logstash elasticsearch template - disable _all field, enable simple analyzer, set default query field to @message
curl -XPUT localhost:9200/_template/logstash -d '
{
"template" : "logs-*",
"settings" : {
"index.analysis.analyzer.default.type": "simple",
"index.cache.field.type": "soft",
"index.compress.stored": true,
"index.merge.policy.max_merged_segment": "5g",
"index.query.default_field": "@message",
"index.refresh_interval": "5s",
@jgeurts
jgeurts / install-graphite-ubuntu-12.04.sh
Created July 14, 2012 16:36 — forked from tkoeppen/install-graphite-ubuntu-10.04.sh
Install Graphite 0.9.10 on Ubuntu 12.04
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
cd
sudo apt-get update
sudo apt-get upgrade
@BenHall
BenHall / bootstrap.jade
Created November 22, 2011 18:36
Twitter Bootstrap in Jade
script(src='/javascripts/jquery-1.7.min.js')
link(rel='stylesheet', href='/stylesheets/bootstrap.min.css')
link(rel='stylesheet', href='/stylesheets/bootstrap-overrides.css')
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
sudo apt-get update
sudo apt-get upgrade