Skip to content

Instantly share code, notes, and snippets.

View agengdp's full-sized avatar
🌀
Rasengan

Ageng D. Prastyawan agengdp

🌀
Rasengan
  • Rexcarnation
  • Indonesia
View GitHub Profile
@Shelob9
Shelob9 / delete-all.php
Last active December 29, 2018 02:12
Example code for reading, updating and deleting Caldera Forms entries. See: https://calderaforms.com/doc/edit-caldera-forms-entries-php/
<?php
//delete all saved Caldera Forms
$forms = Caldera_Forms_Forms::get_forms( false, true );
if( ! empty( $forms ) ){
foreach( $forms as $form ){
Caldera_Forms_Forms::delete_form( $form );
}
}
@adamwathan
adamwathan / troubleshooting.md
Last active January 19, 2021 04:14
Troubleshooting Valet on macOS Sierra

Troubleshooting Valet on Sierra

Common Problems

Problem: I just see "It works!"

Apache is running on port 80 and interfering with Valet.

  1. Stop Apache: sudo /usr/sbin/apachectl stop
  2. Restart Valet: valet restart
@ben-albon
ben-albon / php5.6-pgsql.Dockerfile
Last active April 21, 2024 17:10
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html
@tommcfarlin
tommcfarlin / add-custom-post-type-menu.php
Created April 25, 2013 12:38
[WordPress] Add a custom post type menu as a child of an existing custom post type menu.
<?php
// Define the 'Portfolio' post type. This is used to represent galleries
// of photos. This will be our top-level custom post type menu
$args = array(
'labels' => array(
'all_items' => 'Gallery',
'menu_name' => 'Portfolio',
'singular_name' => 'Gallery',
'edit_item' => 'Edit Gallery',
@faisalman
faisalman / Rupiah.as
Created February 26, 2011 15:35
Konversi Angka ke format Rupiah & vice versa (C#, PHP, JavaScript, ActionScript 3.0)
package
{
/**
* ActionScript 3.0 Code Snippet
* Convert Number to Rupiah & vice versa
* https://gist.github.com/845309
*
* Copyright 2011-2012, Faisalman
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license