Skip to content

Instantly share code, notes, and snippets.

View christianvoigt's full-sized avatar

Christian Voigt christianvoigt

View GitHub Profile
@atteneder
atteneder / Matrix4x4Extension.cs
Last active November 1, 2022 09:05
Matrix Decomposition (more robust than Matrix4x4.rotation/Matrix4x4.lossyScale)
// Copyright 2020-2022 Andreas Atteneder
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@salcode
salcode / .gitignore
Last active February 19, 2025 22:44
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@ethanclevenger91
ethanclevenger91 / functions.php
Last active November 30, 2016 19:09
All in One Event Calendar - Adding filters + functions to Twig themes For more reading on uses of functions vs. filters in Twig: http://twig.sensiolabs.org/doc/advanced.html
function add_twig_functions_and_filters() {
global $ai1ec_front_controller;
$loader = $ai1ec_front_controller->return_registry(true)->get('theme.loader');
$twig = $loader->get_twig_instance(false, true);
function foo($date) {
if(mktime() > strtotime($date->__toString)) {
return true;
}
else return false;
}
@kopischke
kopischke / markdown2evernote.rb
Created June 5, 2011 16:57
OS X service scripts
#!/usr/bin/env ruby -wKU
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/)
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/)
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line)
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript)
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script)
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing;
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1
# – handle both smart typography processing scripts (ie. SmartyPants.pl)