Skip to content

Instantly share code, notes, and snippets.

View mikebronner's full-sized avatar
🖥️
Scrum of the earth.

Mike Bronner mikebronner

🖥️
Scrum of the earth.
View GitHub Profile
@mikebronner
mikebronner / install_amplify.sh
Created February 21, 2019 00:28
Nginx Amplify Scripts
#!/bin/bash
if [ `id -u` -ne 0 ]
then
echo "You must be root!" >&2
exit 1
fi
amplify_api_key="$AMPLIFY_KEY"
db_password="$DATABASE_PASSWORD"
@fmasuhr
fmasuhr / gist:4fd661b884f157590613
Last active June 27, 2022 03:25
Associate a Vagrant project directory with an existing VirtualBox VM
  1. Run the following command and copy the ID of your VM
VBoxManage list vms
=> "virtualMachine" {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
  1. Go to the Vagrant project configuration folder
@hissy
hissy / gist:7352933
Created November 7, 2013 11:07
[WordPress] Add file to media library programmatically
<?php
$file = '/path/to/file.png';
$filename = basename($file);
$upload_file = wp_upload_bits($filename, null, file_get_contents($file));
if (!$upload_file['error']) {
$wp_filetype = wp_check_filetype($filename, null );
$attachment = array(
'post_mime_type' => $wp_filetype['type'],
'post_parent' => $parent_post_id,
@danielcosta
danielcosta / integrating_jira_with_sourcetree.md
Last active November 7, 2023 21:03
Learn how to integrate your SourceTree repositories with JIRA

Integrating JIRA with SourceTree

Overview

You will learn how to link your JIRA tasks directly on SourceTree

Step by step

1. Setting

@gibbs
gibbs / currency_symbols.php
Last active April 3, 2024 10:09
An array of currency symbols as HTML entities
<?php
$currency_symbols = array(
'AED' => '&#1583;.&#1573;', // ?
'AFN' => '&#65;&#102;',
'ALL' => '&#76;&#101;&#107;',
'AMD' => '',
'ANG' => '&#402;',
'AOA' => '&#75;&#122;', // ?
'ARS' => '&#36;',
'AUD' => '&#36;',
@billerickson
billerickson / gist:1617049
Created January 15, 2012 20:16
Display Posts Shortcode - Exclude Categories
<?php
/**
* Display Posts Shortcode - Exclude Categories
* @author Bill Erickson
* @link http://wordpress.org/extend/plugins/display-posts-shortcode/
*
* @param array $args
* @param array $atts
* @return array $args