Skip to content

Instantly share code, notes, and snippets.

View matthijs166's full-sized avatar

Matthijs Knigge matthijs166

View GitHub Profile
@matthijs166
matthijs166 / 3d_model_converter.sh
Created August 24, 2022 07:28 — forked from yibojiang/model_converter.sh
a simple bash tool converting model
#!/bin/bash
# Author Yibo Jiang
# Contact: yibojiang00@gmail.com
# Assimp
# License 3-clause BSD-License. Copyright (c) 2006-2015 assimp team All rights reserved..
function list {
$debug_tags = array();
add_action( 'all', function ( $tag ) {
global $debug_tags;
if ( in_array( $tag, $debug_tags ) ) {
return;
}
echo "<pre>" . $tag . "</pre>";
$debug_tags[] = $tag;
} );
add_filter( 'register_post_type_args', 'portfolio_args', 10, 2 );
function portfolio_args( $args, $post_type ) {
if ( 'la_portfolio' === $post_type ) {
$args['rewrite']['slug'] = 'collectie';
$args['label'] = 'Collecties';
$args['name'] = 'Collecties';
$args['singular_name'] = 'Collectie';
}
return $args;
function patricks_wc_terms( $terms_is_checked ) {
return true;
}
add_filter( 'woocommerce_terms_is_checked', 'patricks_wc_terms', 10 );
add_filter( 'woocommerce_terms_is_checked_default', 'patricks_wc_terms', 10 );
[git-ftp]
url = sftp://gamerleague.nl:22/www/test
user = gamerleague.nl
password = test
syncroot = dist/
git ftp init --insecure
@matthijs166
matthijs166 / css_dashed
Created January 24, 2019 09:24
Css dashed line more control
/*Horizontal*/
background-image: linear-gradient(to right, black 33%, rgba(255,255,255,0) 0%);
background-position: bottom;
background-size: 3px 1px;
background-repeat: repeat-x;
/*Vertical*/
background-image: linear-gradient(black 33%, rgba(255,255,255,0) 0%);
background-position: right;
background-size: 1px 3px;
@matthijs166
matthijs166 / Pure Ftpd
Created December 1, 2018 19:22
add passive ports
Create a file in /etc/pure-ftpd/conf/PassivePortRange, inside, just write the port range separated with a space.
echo "29799 29899" > /etc/pure-ftpd/conf/PassivePortRange
(for max 50 connected clients)
pure-ftpd uses files in conf dir as parameters. Be carefull setting your ports, they must NOT be used by the kernel.
You must have 2 ports for every client (max 100 clients, you need 200 ports).
If you need more or less than 50 default clients allowed, you must:
@matthijs166
matthijs166 / php_folder_loader
Created November 20, 2018 09:43
php load class loader load files in sub dir directory
$subdir = "/modules/";
foreach (scandir(dirname(__FILE__) . $subdir) as $filename) {
$path = dirname(__FILE__) . $subdir . $filename;
if (is_file($path)) {
require_once $path;
}
}
@matthijs166
matthijs166 / wc trigger
Created September 14, 2018 09:27
trigger a woocmmerce js trigger
(function($){
$('body').on( 'wc_fragments_loaded', function(){
self.update();
});
})(jQuery);