| HEADER | EMPHASIS | HORIZONTAL_LINE | LIST | TABLE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Decode a URL-encoded string. | |
*/ | |
String urlDecode(String str) | |
{ | |
String encodedString = ""; | |
char c; | |
char code0; | |
char code1; | |
for (int i = 0; i < str.length(); i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
########################################################################## | |
# Shellscript : Backup and update WordPress using wp-cli | |
# Author : Grant Norwood <grantnorwood.com> | |
# Original Author : Paco Orozco <paco@pacoorozco.info> | |
# Requires : wp-cli | |
########################################################################## | |
# Changelog | |
# 20220430: 2.0 | |
# Adds a user-specified option for forcing backup & updates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress' missing is_blog_page() function. Determines if the currently viewed page is | |
* one of the blog pages, including the blog home page, archive, category/tag, author, or single | |
* post pages. | |
* | |
* @see http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/query.php#L1572 | |
* | |
* @return bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print the green/red arrow. | |
PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
# Add the current directory & git prompt info | |
# | |
# This checks whether the path is longer then 5 elements, and in that case prints the first element (%-1~), | |
# some dots (/…/) and the last 3 elements. It is not exactly the same as paths that are not in your home | |
# directory, will also have the first element at the beginning, while bash just prints dots in that case: | |
# | |
# "%(5~|%-1~/…/%3~|%4~)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
type VacationRental { | |
id: ID! | |
title: String # removed the ! | |
description: String # removed the ! | |
owner: Owner! | |
roomCount: Int # removed the ! | |
address: Address # removed the ! | |
geolocation: GeoLocation # removed the ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Initial schema | |
type Query { | |
vacationRentalById(id: $id) : VacationRental | |
} | |
type VacationRental { | |
id: ID! | |
title: String! | |
description: String! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
vacationRentalById(id: $id) : VacationRental | |
} | |
type VacationRental { | |
id: ID! | |
title: String | |
description: String | |
owner: Owner! | |
roomCount: Int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
type Owner { | |
name: String! | |
email: String! | |
phone: String! | |
twitterHandle: String # removed the ! | |
inboxNotifications: [Notification] | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
type Owner { | |
name: String! | |
email: String! | |
phone: String! | |
twitterHandle: String! | |
inboxNotifications: [Notification] # removed the ! | |
} | |
NewerOlder