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
SELECT SEC_TO_TIME((TIME_TO_SEC(NOW()) DIV 900) * 900) AS QUARTER_HOUR; |
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
add_filter( 'pre_get_posts', 'feed_filter' ); | |
function feed_filter( $query ) { | |
if ( $query->is_feed ) { | |
add_filter( 'rss2_item', 'feed_content_filter'); | |
} | |
return $query; | |
} | |
function feed_content_filter() { | |
global $post; |
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
const propertiesNotWritable = []; | |
function extract(o) { | |
for (let i in o.prototype) { | |
if (o.prototype.hasOwnProperty(i)) { | |
let p = Object.getOwnPropertyDescriptor(o.prototype, i); | |
if (!p.writable && !p.set && !propertiesNotWritable.includes(i)) | |
propertiesNotWritable.push(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
CREATE FUNCTION CAP_FIRST (input VARCHAR(255)) | |
RETURNS VARCHAR(255) | |
DETERMINISTIC | |
BEGIN | |
DECLARE len INT; | |
DECLARE i 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
<html> | |
<head> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.1/raphael.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/graphdracula/1.0.3/dracula.min.js"></script> | |
<script type="text/javascript"> | |
function graph() { | |
var g = new Dracula.Graph(); | |
g.addEdge("strawberry", "cherry"); | |
g.addEdge("strawberry", "apple"); |
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 | |
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]') | |
git commit -a -m "v$PACKAGE_VERSION" | |
git tag -a "v$PACKAGE_VERSION" -m "v$PACKAGE_VERSION" | |
git push --follow-tags |