Skip to content

Instantly share code, notes, and snippets.

View petersuhm's full-sized avatar

Peter Suhm petersuhm

View GitHub Profile
@petersuhm
petersuhm / wppusher-email-notifications.php
Created March 21, 2017 06:47
WP Pusher Hooks Example
<?php
// ...
add_action('wppusher_theme_was_updated', function($stylesheet) use ($notifier) {
$notification = ThemeWasUpdated::fromStylesheet($stylesheet);
$notifier->notify($notification);
});
@petersuhm
petersuhm / wppusher-dropbox.php
Last active March 21, 2017 13:28
WP Pusher Dropbox Exampl
<?php
// We need a new repository
class DropboxRepository extends Repository
{
public $code = 'db';
public function getZipUrl()
{
// Somehow fetch URL to zipball from Dropbox ...
<?php
/**
* Plugin Name: Disable SSL Verify
*/
add_filter('https_ssl_verify', function ($options) {
var_dump($options); die();
}, 10, 1);
add_filter('https_local_ssl_verify', '__return_false');
@petersuhm
petersuhm / docker-compose.yml
Last active May 23, 2019 15:46
WP docker compose example
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
@petersuhm
petersuhm / terms_of_service.markdown
Last active November 5, 2019 12:35 — forked from devver/terms_of_service.markdown
A general Terms of Service under the Creative Commons License

Terms of Service

Last revised on [DATE]

The Gist

Branch Continuous Integration, Inc. operates the Branch service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.

For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

@petersuhm
petersuhm / cypress.js
Created April 1, 2020 11:08
Cypress JS example
describe('Homepage', function() {
it('can be visited', function() {
cy.visit('https://www.branchci.com/')
})
})
@petersuhm
petersuhm / reform-embed.jsx
Created September 22, 2021 07:07 — forked from jrbaudin/reform-embed.jsx
Reform.app embedded form in Next.js
import Script from 'next/script'
type Props = {
formUrl: string
}
export const ReformEmbed = ({ formUrl }: Props) => {
return (
<>
<div id="my-reform" className="z-50 relative" />
<Script>