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
// 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 | |
*/ |
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
var win = Ti.UI.createWindow(); | |
win.open(); | |
/// <<< Register & UnRegister Event Listeners | |
/** | |
* params: {event: 'event', callback: eventCallback} | |
*/ | |
function registerEventListener(obj, params) { | |
if ( typeof obj._eventListeners == 'undefined' ) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Upload your files</title> | |
</head> | |
<body> | |
<form enctype="multipart/form-data" action="upload.php" method="POST"> | |
<p>Upload your file</p> | |
<input type="file" name="uploaded_file"></input><br /> | |
<input type="submit" value="Upload"></input> |
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
function search($array, $key, $value) | |
{ | |
$results = array(); | |
if (is_array($array)) | |
{ | |
if (isset($array[$key]) && $array[$key] == $value) | |
$results[] = $array; | |
foreach ($array as $subarray) |
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
/** | |
* The Kitt Effect using Efficient CSS Animation | |
*/ | |
html, body { | |
font:normal 100%/1.5 sans-serif; | |
} | |
.kitt, | |
.kitt div, |
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
/*------------------------------------------ | |
Responsive Grid Media Queries - 1280, 1024, 768, 480 | |
1280-1024 - desktop (default grid) | |
1024-768 - tablet landscape | |
768-480 - tablet | |
480-less - phone landscape & smaller | |
--------------------------------------------*/ | |
@media all and (min-width: 1024px) and (max-width: 1280px) { } | |
@media all and (min-width: 768px) and (max-width: 1024px) { } |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My Iframe</title> | |
</head> | |
<body> | |
<button>Botão</button> | |
<script type="text/javascript"> |
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 python | |
# A simple script to suck up HTML, convert any images to inline Base64 | |
# encoded format and write out the converted file. | |
# | |
# Usage: python standalone_html.py <input_file.html> <output_file.html> | |
# | |
# TODO: Consider MHTML format: https://en.wikipedia.org/wiki/MHTML | |
import os | |
from bs4 import BeautifulSoup |
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 | |
/* | |
* Sort Next/Previous Post Link Buttons Alphabetically | |
*/ | |
function filter_next_post_sort($sort) { | |
if (get_post_type($post) == 'portfolio_page') { | |
$sort = "ORDER BY p.post_title ASC LIMIT 1"; | |
} | |
else{ | |
$sort = "ORDER BY p.post_date ASC LIMIT 1"; |
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 | |
//url | |
$redirect = "http://www.eyeofriyadh.com/events/"; | |
$event = getEvents($redirect); | |
echo "Dates are : <br>" . $event; |
OlderNewer