Skip to content

Instantly share code, notes, and snippets.

View gdevlugt's full-sized avatar

Geoffrey de Vlugt gdevlugt

View GitHub Profile
@STiXzoOR
STiXzoOR / TeamViewer-15-id-changer-for-mac.py
Last active June 18, 2024 15:47 — forked from 0x2a94b5/TeamViewer-15-id-changer-for-mac.py
Teamviewer 15 ID Changer for macOS (Python 3)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# System: macOS 12+
# Version: TeamViewer v15.x.x
# Python: 3.x.x
# Command: sudo python TeamViewer-15-id-changer.py
#
import os
@idarek
idarek / TeamViewer-15-30-3-id-changer-for-mac.py
Last active March 21, 2023 15:47
TeamViewer ID changer (works with TV 15.32.3+ and macOS 12.6)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import platform
import random
import re
import string
import sys
<?php
class WCML_REST_API_Support{
/** @var woocommerce_wpml */
private $woocommerce_wpml;
/** @var Sitepress */
private $sitepress;
/** @var WCML_REST_API_Query_Filters_Products */
private $query_filters_products;
@groucho75
groucho75 / merging_wp_queries.php
Last active March 1, 2023 09:43
Merging results of 2 WP_Query
<?php
/**
* Case: related news
*
* At first query for posts of same category, then, if it doesn't find enough posts, query for other posts and merge the 2 results.
*
* Put the following code inside a single template.
*
* @link Inspired by http://wordpress.stackexchange.com/questions/71576/combining-queries-with-different-arguments-per-post-type#answer-71582
@gilbitron
gilbitron / .env.travis
Last active August 12, 2023 08:06
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@CiprianSpiridon
CiprianSpiridon / Laravel-Blade-Template-Cheatsheet
Last active June 11, 2024 08:30
Laravel Blade Template Cheatsheet
{{ $var }} - Echo content
{{ $var or 'default' }} - Echo content with a default value
{{{ $var }}} - Echo escaped content
{{-- Comment --}} - A Blade comment
@extends('layout') - Extends a template with a layout
@if(condition) - Starts an if block
@else - Starts an else block
@elseif(condition) - Start a elseif block
@endif - Ends a if block
@iovar
iovar / proxy.php
Last active February 24, 2024 18:29
Simple PHP Proxy Script
<?php
/*
* Warning! Read and use at your own risk!
*
* This tiny proxy script is completely transparent and it passes
* all requests and headers without any checking of any kind.
* The same happens with JSON data. They are simply forwarded.
*
* This is just an easy and convenient solution for the AJAX
@barryvdh
barryvdh / _ide_helper.php
Last active May 6, 2024 07:45
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@kloon
kloon / gist:4228021
Created December 6, 2012 20:25
WooCommerce variations custom field
//Display Fields
add_action( 'woocommerce_product_after_variable_attributes', 'variable_fields', 10, 2 );
//JS to add fields for new variations
add_action( 'woocommerce_product_after_variable_attributes_js', 'variable_fields_js' );
//Save variation fields
add_action( 'woocommerce_process_product_meta_variable', 'variable_fields_process', 10, 1 );
function variable_fields( $loop, $variation_data ) {
?>
<tr>
@billsinc
billsinc / gist:1157544
Created August 19, 2011 18:10
Remove Firebird DB from MacOS
#!/bin/sh
echo "Clean Services"
echo "Clean User"
dscl localhost -delete /Local/Default/Users/firebird
echo "Clean Group"
dscl localhost -delete /Local/Default/Groups/firebird
if [ -f "/Library/StartupItems/Firebird" ]; then
echo "Remove SuperServer StartupItem"
rm -fr /Library/StartupItems/Firebird
fi