This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const postHogApiKey = "POSTHOG_API_KEY"; | |
const postHogEndpoint = "https://app.posthog.com/capture"; | |
const headers = { | |
"Content-Type": "application/json", | |
}; | |
// Customer information | |
const customer = init.data.customer; | |
const { id, email, firstName, lastName } = customer; | |
const fullName = `${firstName} ${lastName}`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT License | |
Copyright © Joel Whitaker | |
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 without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db: | |
image: postgres:13 | |
volumes: | |
- db-data:/var/lib/postgresql/data/pgdata | |
ports: | |
- 5432:5432/tcp | |
environment: | |
- POSTGRES_PASSWORD=odoo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Search "$dir_iterator" then insert those codes below this line: | |
// $dir_iterator = new RecursiveDirectoryIterator( $dir ); | |
$filter = array( 'framework', 'tools', 'vendor', 'lib', 'installer', 'updater' ); | |
$dir_iterator = new \RecursiveCallbackFilterIterator( | |
$dir_iterator, | |
function( $item ) use ( $filter ) { | |
return ! in_array( $item->getBaseName(), $filter ); | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin name: Site Title (and Tagline) Smilies | |
* Description: Demonstration of selective refresh in the Customizer. Selectors are targeting elements in Twenty Fifteen. | |
* Author: Weston Ruter, XWP | |
* Plugin URL: https://gist.github.com/westonruter/a15b99bdd07e6f4aae7a | |
* | |
* @package SiteTitleSmilies | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Removing the automatic <p> and <br> WordPress Shortcodes | |
// By Fouad Badawy | tielabs.com | |
function tie_fix_shortcodes($content){ | |
$array = array ( | |
'[raw]' => '', | |
'[/raw]' => '', | |
'<p>[raw]' => '', | |
'[/raw]</p>' => '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Escape all translations with | |
*/ | |
__( ‘Some String’, ‘text-domain’ ); _e( ‘Some string’, ‘text-domain’ );. | |
/** | |
* When there is no HTML use: | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |