Skip to content

Instantly share code, notes, and snippets.

@RadGH
RadGH / rs_gf_get_checked_boxes.php
Last active May 27, 2023 10:49
Get checked checkboxes from Gravity Forms checkbox field, as array
<?php
// 1/3) Usage:
$entry_id = 100; // usually provided in a filter, if so you can remove this line.
$entry = GFAPI::get_entry( $entry_id ); // get the entry, if this was provided in a filter you can remove this line.
$field_id = 35; // field ID can be found when field is selected while editing the form
$value = rs_gf_get_checked_boxes( $entry, $field_id );
// 2/3) Example output:
@ankurk91
ankurk91 / xdebug-mac.md
Last active March 9, 2024 22:20
php xDebug v3 on Ubuntu/Mac and phpStorm

🪲 Install and Configure xDebug v3 on MacOS for PhpStorm 🐘

  • Assuming that you have already installed php and apache via Homebrew

  • Install xDebug php extension

pecl channel-update pecl.php.net
pecl clear-cache

pecl install xdebug
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 22, 2024 17:28
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@manastungare
manastungare / css-compress.php
Created May 7, 2012 00:23
On-the-fly CSS Compression
<?php
/**
* On-the-fly CSS Compression
* Copyright (c) 2009 and onwards, Manas Tungare.
* Creative Commons Attribution, Share-Alike.
*
* In order to minimize the number and size of HTTP requests for CSS content,
* this script combines multiple CSS files into a single file and compresses
* it on-the-fly.
*