Skip to content

Instantly share code, notes, and snippets.

View AmauryVanEspen's full-sized avatar

Amaury Van Espen AmauryVanEspen

View GitHub Profile
@AmauryVanEspen
AmauryVanEspen / imath-pm-friends-only.php
Created May 2, 2023 13:12 — forked from imath/imath-pm-friends-only.php
I was writing my second BuddyPress tutorial for wpformation.com when i realized it could be helpful for a community admin to restrict private messages to friends only...
<?php
/*** beginning of the code to paste in your functions.php ***/
function imath_pm_button_only_if_friends( $button ) {
if( is_super_admin() )
return $button;
if( 'is_friend' != friends_check_friendship_status( bp_displayed_user_id(), bp_loggedin_user_id() ) )
return false;
@AmauryVanEspen
AmauryVanEspen / gist:889d4ae201788b5b1c6b24d3b9015b7e
Created December 1, 2020 18:50
EURL Google Apps Script for Quickbooks
<h2>End-User License Agreement (EULA) of <span class="app_name">Google Apps Script for Quickbooks</span></h2>
<p>This End-User License Agreement ("EULA") is a legal agreement between you and <span class="company_name">Alterna R&amp;D</span>. Our EULA was created by <a href="https://www.eulatemplate.com">EULA Template</a> for <span class="app_name">Google Apps Script for Quickbooks</span>.</p></p>
<p>This EULA agreement governs your acquisition and use of our <span class="app_name">Google Apps Script for Quickbooks</span> software ("Software") directly from <span class="company_name">Alterna R&amp;D</span> or indirectly through a <span class="company_name">Alterna R&amp;D</span> authorized reseller or distributor (a "Reseller"). Our Privacy Policy was created by <a href="https://www.generateprivacypolicy.com/">the Privacy Policy Generator</a>.</p>
<p>Please read this EULA agreement carefully before completing the installation process and using the <span class="app_name">Google Apps Script for Quickbooks</sp
@AmauryVanEspen
AmauryVanEspen / gas_qbo_oauth2.js
Created July 18, 2020 12:49 — forked from goelp/gas_qbo_oauth2.js
Google Apps Script OAuth2 script for QuickBooks integration with Google Sheets
var CLIENT_ID = '...'; // Get from Quickbooks Developer Console
var CLIENT_SECRET = '...'; // Get from Quickbooks Developer Console
var BASE_AUTH_URL = 'https://appcenter.intuit.com/connect/oauth2';
var TOKEN_URL = 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer';
var API_SCOPE = 'com.intuit.quickbooks.accounting';
var REDIRECT_URI = '...'; // Generate using the logRedirectUri() function mentioned at the end of this script
var RESPONSE_TYPE = 'code';
/**
* Authorizes and makes a request to the Quickbooks API using OAuth 2.
*&---------------------------------------------------------------------*
*& Report Z_BC_JOB_PERF
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT z_bc_job_perf.
*Selection Screen Text Elements Declared :
******************************************
*TEXT-005 - Batch job monitoring
@echo off
set filedate=%DATE%
set filedate=%filedate:~6,4%%filedate:~3,2%%filedate:~0,2%
setlocal enableextensions enabledelayedexpansion
for /r %%f in (*.txt) do (
set filename=%%~nxf
ren *.txt "%filedate%_NU_LCC-INTELKD-IAQ-OSINT-!filename: =-!"
@AmauryVanEspen
AmauryVanEspen / git_submodules.md
Last active August 15, 2018 23:51 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

update from https://git-scm.com/book/en/v2/Git-Tools-Submodules

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

@AmauryVanEspen
AmauryVanEspen / drop-submenu.js
Created March 20, 2017 11:00
dropdown-submenu
.dropdown-submenu{position:relative;}
.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;
-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
.dropdown-submenu:hover>.dropdown-menu{display:block;}
.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;
border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;}
.dropdown-submenu:hover>a:after{border-left-color:#ffffff;}
.dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;
-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}