Skip to content

Instantly share code, notes, and snippets.

View petersuhm's full-sized avatar

Peter Suhm petersuhm

View GitHub Profile
@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>
@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 / 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 / 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
<?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 / 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 ...
@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 / docker-compose.yml
Created February 20, 2017 20:51
Docker Compose file for WP Pusher
version: '2'
services:
db:
image: mysql:5.7
volumes:
- wp_pusher_db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
@petersuhm
petersuhm / Usage
Last active August 1, 2018 13:10
Docker Compose file I use during development of WP Pusher
$ docker-compose up -d
Creating network "wppusherplugin_default" with the default driver
Creating wppusherplugin_db_1
Creating wppusherplugin_wordpress_1
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ecec64717d29 wordpress:php5.6-apache "docker-entrypoint.sh" 5 seconds ago Up 2 seconds 0.0.0.0:80->80/tcp wppusherplugin_wordpress_1
54ed735f15e4 mysql:5.7 "docker-entrypoint.sh" 7 seconds ago Up 4 seconds 3306/tcp wppusherplugin_db_1
@petersuhm
petersuhm / AppServiceProvider.php
Last active August 29, 2015 14:27
Bind a class to current authenticated object in a multi tenant app.
<?php
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()