Skip to content

Instantly share code, notes, and snippets.

# -*- mode: sh; coding: utf-8 -*-
GOODZONE_FABRIC_WATERMARK_IMG=/home/regular-user/work/goodzone-fabric-convert/data/watermark.png
goodzone_fabric_convert_ico () {
mogrify -resize 160x160 "$@"
}
goodzone_fabric_convert_watermark () {
composite -compose atop -gravity center "$GOODZONE_FABRIC_WATERMARK_IMG" "$1" "$1"
@polymorphm
polymorphm / test-py.cpp
Last active July 21, 2021 19:46
test (hello world) python-c-api
// -*- mode: cpp; coding: utf-8 -*-
//
// $ g++ -pedantic -std=c++11 -o test-py test-py.cpp $(pkg-config --cflags --libs python3)
//
#include <clocale>
#include <cstdlib>
#include <Python.h>
int main(int argc, char *argv[]) {
#!/usr/bin/env python2
# -*- mode: python; coding: utf-8 -*-
from __future__ import absolute_import, print_function
assert unicode is not str
assert str is bytes
import sys, datetime
#!/usr/bin/env python3
# -*- mode: python; coding: utf-8 -*-
assert str is not bytes
import sys
import csv
def main():
for arg in sys.argv[1:]: