Skip to content

Instantly share code, notes, and snippets.

View Hibou57's full-sized avatar
💭
Busy at food growing since more than a year now

Yannick Duchêne Hibou57

💭
Busy at food growing since more than a year now
View GitHub Profile
@fospathi
fospathi / svg_matrix_y_flip.txt
Last active August 15, 2022 23:20
SVG matrix to flip the Y-axis direction
The Y-axis in an SVG document points towards the bottom of the page, that is the Y value increases the further down the page
you go. When positioning items in a maths or physics context however it is more appropriate to have the Y-axis pointing up
the page like a normal coordinate system. We can provide an affine transformation matrix to a g element's transform
attribute that flips the Y-axis for its children.
Let the value of the viewBox attribute of the document's SVG element equal "0 0 w h". Suppose we want a coordinate system
whose origin is at the centre of the viewbox and whose Y-axis points up to the top of the page.
(0, 0)
O_ _ _ _ _ _ _ _\ X (Default SVG coordinate system/frame)
@budRich
budRich / i3gw
Last active August 2, 2024 10:22
ghost window wrapper for i3wm
#!/bin/bash
# i3gw - "ghost window" wrapper for i3
# ctrl+c, ctrl+v by budRich 2017
#
# https://www.reddit.com/r/i3wm/comments/6x5vgp/oc_i3gw/
# https://gist.github.com/budRich/d09cbfd07ffdc57680fbc51ffff3687b
#
# i3-msg has an undocumented function (open) that creates
# empty containers, or as I call them: ghosts.
@budRich
budRich / i3get
Last active April 10, 2023 16:32
extract window information from i3 tree
#!/bin/sh
# i3get
#
# search for windows in i3 tree, return desired information
# if no arguments are passed. con_id of acitve window is returned.
# ctrl+c, ctrl+v by budRich 2017
# bash to sh by: nimaje
#
# Options:
@dimitarcl
dimitarcl / Doxyfile
Created September 22, 2012 21:22
Documenting JavaScript with Doxygen
FILTER_PATTERNS =*.js=doxygen.js
@neonux
neonux / readonly-proxy.js
Created April 26, 2012 18:22
read-only proxy
function wrap(aObject)
{
if (aObject === undefined || aObject === null) {
return aObject;
}
let type = typeof(aObject);
if (type == "string" || type == "number" || type == "boolean" || type == "function") {
return aObject;
}
@schacon
schacon / FUGPL.txt
Created September 25, 2008 18:49
the anti-gpl license
The FUGPL License
===================
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software with only one restriction. No part of
it may be included in software projects that are solely distributed under
strong copyleft restricted licenses. This license is *NOT* GPL compatible,
and that is it's only restriction.