Skip to content

Instantly share code, notes, and snippets.

Jonathonbyrd / CitiesArray.php
Created Aug 18, 2010
Cities Array :: An array of USA cities, as of April 2010
View CitiesArray.php
JonasEriksson / MuraCMS-ContentBeans-example1.cfm
Created Apr 18, 2016
Mura CMS: Loading and displaying Mura Content Beans in a template
View MuraCMS-ContentBeans-example1.cfm
When building a single-page website with many content sections,
it can be easier to manage for end-users if the content parts
are managed as normal "pages" in Mura CMS, even if they are not
part of the normal/public site structure and/or navigation.
These normal content items (usually pages), then have Title,
Summary, Body, Associated Image etc. loaded by their respective
ContentID, page-name or titles.
The same applies to listing users with available contact information.
Below are a few examples on how this can be done for content.
bzerangue / us-states.xml
Created May 21, 2011
List of States in the United States of America (with dates of when they became as state)
View us-states.xml
<?xml version="1.0" encoding="UTF-8"?>
<states nation="United States of America" nation-abbreviation="USA" nation-capital="Washington, D.C.">
<state name="Alabama" abbreviation="AL" capital="Montgomery" date="1819-12-14" most-populous-city="Birmingham" population="4708708" square-miles="52423" time-zone-1="CST (UTC-06)" time-zone-2="EST (UTC-05)" dst="Yes"/>
<state name="Alaska" abbreviation="AK" capital="Juneau" date="1959-01-03" most-populous-city="Anchorage" population="698473" square-miles="656425" time-zone-1="AKST (UTC-09)" time-zone-2="HST (UTC-10)" dst="Yes"/>
<state name="Arizona" abbreviation="AZ" capital="Phoenix" date="1912-02-14" most-populous-city="Phoenix" population="6595778" square-miles="114006" time-zone-1="MT (UTC-07)" dst="No"/>
<state name="Arkansas" abbreviation="AR" capital="Little Rock" date="1836-06-15" most-populous-city="Little Rock" population="2889450" square-miles="53182" time-zone-1="CST (UTC-06)" dst="Yes"/>
<state name="California" abbreviation="CA" capital="Sacrame
maxd / modena.css
Last active Feb 20, 2020
modena.css from JDK 10.0.1
View modena.css
* Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
import json
print('Loading function')
def lambda_handler(event, context):
#1. Parse out query string params
transactionId = event['queryStringParameters']['transactionId']
transactionType = event['queryStringParameters']['type']
transactionAmount = event['queryStringParameters']['amount']
cferdinandi / metabox-multiple.php
Last active Feb 20, 2020
Create a metabox with multiple fields
View metabox-multiple.php
* Create a metabox with multiple fields.
* Replace `_namespace` with some namespace for your project to avoid conflicts with other items
// Create Metabox
justintv / .bashrc
Created Aug 17, 2009
Display git branch in bash prompt
View .bashrc
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer!
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ "
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty!
# ~/code/web:beta_directory$ git checkout master
# Switched to branch "master"
# ~/code/web:master$ git checkout beta_directory
# Switched to branch "beta_directory"
PurpleBooth /
Last active Feb 20, 2020
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


View Balsamiq mockups Serial
Organization name:
Serial Key: eNrzzU/OLi0odswsqslJTa3IzHJIz03MzNFLzs+tMTQyNrcwsTQyAIEa5xpDAIFxDy8k
Faheetah / Jenkinsfile.groovy
Last active Feb 20, 2020
Jenkinsfile idiosynchrasies with escaping and quotes
View Jenkinsfile.groovy
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
You can’t perform that action at this time.