Skip to content

Instantly share code, notes, and snippets.

View barbwiredmedia's full-sized avatar

Barbara Talbot barbwiredmedia

View GitHub Profile
<?php
$file = "img/15.jpeg";
$data = exif_read_data($file); // Returns a Multidimensional array containing image META information
print_r($data);
?>
@elcuervo
elcuervo / gist:937198
Created April 22, 2011 17:42
Scrum Chuck
* Chuck Norris always starts his projects with a Roundhouse-Kickoff.
* Chuck Norris is ScrumMaster and ProductOwner - simultaneously.
* Chuck Norris always wins at Planning Poker.
* Chuck Norris does not estimate, he knows.
* Chuck Norris can do 6-month sprints.
* Chuck Norris does not move story cards, he moves the taskboard.
* When Chuck Norris says "done", believe me, it’s "done".
* Even Chuck Norris is not allowed to be late at the stand-up meeting. Now you tell him.
* Chuck Norris can do a thousand sit-ups during the stand-up meeting.
* Chuck Norris answers just two questions on the stand-up meeting. Chuck Norris does not know obstacles.
@wesrice
wesrice / random-repeater.php
Created February 27, 2012 16:02
Return a random row of data from an ACF repeater field
<?php
// Get the repeater field
$repeater = get_field( 'repeater_field_name' );
// Get a random rows. Change the second parameter in array_rand() to how many rows you want.
$random_rows = array_rand( $repeater, 2 );
// Loop through the random rows if more than one is returned
if( is_array( $random_rows ) ){
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@terkel
terkel / _decimal.scss
Last active November 23, 2023 18:36
Rounding decimals in Sass
// _decimal.scss | MIT License | gist.github.com/terkel/4373420
// Round a number to specified digits.
//
// @param {Number} $number A number to round
// @param {Number} [$digits:0] Digits to output
// @param {String} [$mode:round] (round|ceil|floor) How to round a number
// @return {Number} A rounded number
// @example
// decimal-round(0.333) => 0
@landru247
landru247 / HTML: IE Conditionals
Created April 23, 2013 06:50
HTML: IE Conditionals
<!--[if IE]>
According to the conditional comment this is IE<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is IE 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is IE 7<br />
<![endif]-->
<!--[if IE 8]>
@landru247
landru247 / WordPress: Contactform 7 - redirect
Created April 30, 2013 18:11
WordPress: Contactform 7 - redirect
on_sent_ok: "location = '/thank-you';"
@landru247
landru247 / WordPress: Contactfrom 7 - modifys contactform 7's default 'select' value
Created April 30, 2013 18:12
WordPress: Contactfrom 7 - modifys contactform 7's default 'select' value of ---
// modifys contact form 7's default select value of --- to Please select...
function my_wpcf7_form_elements($html) {
$text = 'Please select...';
$html = str_replace('<option value="">---</option>', '<option value="">' . $text . '</option>', $html);
return $html;
}
add_filter('wpcf7_form_elements', 'my_wpcf7_form_elements');
// Modify multiple selects
function my_wpcf7_form_elements($html) {
@nzakas
nzakas / gist:5511916
Created May 3, 2013 17:47
Using GitHub inside a company

I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.

  1. What is the primary setup? Is there an organization and each official repo is owned by that organization?
  2. Does every engineer have a fork of each repo they're working on?
  3. Are engineers allowed to push directly to the official repo? Or must all commits go through a pull request?
  4. Do engineers work on feature branches on the main repo or on their own forks?
  5. Do you require engineers to squash commits and rebase before merging?
  6. Overall, what is the workflow for getting a new commit into the main repository?
  7. What sort of hooks do you make use of?
  8. Are there any ops issues you encountered? (Scaling, unforeseen downtime, etc.)