Skip to content

Instantly share code, notes, and snippets.

@jakebellacera
jakebellacera / ICS.php
Last active March 11, 2024 05:12
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@beaucharman
beaucharman / ACF_Layout.php
Last active May 10, 2022 21:27
Logical layout automation for Advanced Custom Fields and it's Flexible Content Field add on. http://www.advancedcustomfields.com/ http://www.advancedcustomfields.com/add-ons/flexible-content-field/
<?php
/**
* ACF Layout
* @version 1.0 | November 12th 2013
* @author Beau Charman | http://twitter.com/beaucharman
* @link https://gist.github.com/beaucharman/7181406
* @license MIT license
*
* Logical layout automation for Advanced Custom Fields and it's Flexible Content Field add on.
@2no
2no / Vagrantfile
Created October 18, 2014 09:52
Vagrant + Docker + dockerfile/nodejs-bower-grunt でフロントの開発環境を整える。
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
ENV['VAGRANT_DEFAULT_PROVIDER'] = "docker"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder ".", "/vagrant", disabled: true
@zackkatz
zackkatz / gravityview-modify-caps-by-id.php
Created October 5, 2015 22:08
GravityView - Examples for modifying editing capabilities by View ID and Entry ID
<?php
/**
* Modify whether an user has access to edit a specific View.
*
* @see https://codex.wordpress.org/Plugin_API/Filter_Reference/user_has_cap
*
* @param array $allcaps All the capabilities of the user
* @param array $cap [0] Required capability
* @param array $args [0] Requested capability
@ziadoz
ziadoz / install.sh
Last active April 7, 2024 16:04
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@ollietreend
ollietreend / acf-php-to-json.php
Last active April 5, 2024 15:37
Convert Advanced Custom Fields Pro configuration from PHP to JSON.
<?php
/**
* Plugin Name: Convert ACF PHP to JSON
* Description: Convert Advanced Custom Fields Pro configuration from PHP to JSON.
*/
namespace ConvertAcfPhpToJson;
/**
* Add submenu item under 'Custom Fields'
@g-kanoufi
g-kanoufi / bitbucket-pipelines.yml
Last active August 3, 2019 17:42 — forked from keesiemeijer/setup-phpunit.sh
Setup Codeception for use in the Local by Flywheel app
image: php:7.2
pipelines:
branches:
# '{develop, staging}':
develop:
- step:
caches:
- composer
script:
# Installing first the libraries necessary to configure and install gd
@Shelob9
Shelob9 / .lando.yml
Last active March 7, 2019 16:36
Lando + xdebug phpStorm
name: formcalderas
recipe: wordpress
config:
env: dev
xdebug: true
php: '7.1'
proxy:
mailhog:
- mail.formcalderas.lndo.site
pma: