This file contains hidden or 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
#!/bin/bash | |
# works with a file called VERSION in the current directory, | |
# the contents of which should be a semantic version number | |
# such as "1.2.3" | |
# this script will display the current version, automatically | |
# suggest a "minor" version update, and ask for input to use | |
# the suggestion, or a newly entered value. |
This file contains hidden or 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
FROM php:5.6-fpm | |
RUN curl -L -o /tmp/xdebug-2.3.3.tgz http://xdebug.org/files/xdebug-2.3.3.tgz \ | |
&& tar xfz /tmp/xdebug-2.3.3.tgz \ | |
&& rm -r /tmp/xdebug-2.3.3.tgz \ | |
&& mv xdebug-2.3.3 /usr/src/php/ext/xdebug \ | |
&& docker-php-ext-install xdebug | |
CMD ["php-fpm"] |
This file contains hidden or 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
{ | |
"name": "npm-task-runner-example", | |
"version": "0.0.1", | |
"description": "", | |
"main": "index.js", | |
"scripts": { | |
"clean": "rimraf dist && mkdirp dist/css", | |
"prebuild": "npm run clean", | |
"build:js": "node tasks/build/js.js", | |
"watch:js": "watch 'npm run build:js' assets/js", |
This file contains hidden or 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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
This file contains hidden or 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
file, err := os.Open(path) | |
if err != nil { | |
return err | |
} | |
defer file.Close() | |
// Only the first 512 bytes are used to sniff the content type. | |
buffer := make([]byte, 512) | |
_, err = file.Read(buffer) | |
if err != nil { |
This file contains hidden or 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
search.templatesConfig.helpers.relevantContent = function() { | |
var attributes = ['content', 'title6', 'title5', 'title4', 'title3', 'title2', 'title1']; | |
var attribute_name; | |
for ( var index in attributes ) { | |
attribute_name = attributes[ index ]; | |
if ( this._highlightResult[ attribute_name ].matchedWords.length > 0 ) { | |
return this._snippetResult[ attribute_name ].value; | |
} | |
} |
This file contains hidden or 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
#ais-wrapper { | |
display: flex; | |
} | |
#ais-main { | |
padding: 1rem; | |
width: 100%; | |
} |
This file contains hidden or 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 | |
class Algolia_Page_Templates | |
{ | |
/** | |
* The array of templates that this plugin tracks. | |
*/ | |
protected $templates; | |
/** |
This file contains hidden or 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 | |
function adjust_curl_timeout( $handle, $r, $url ) { | |
if ( ! isset( $r['timeout'] ) ) { | |
return; | |
} | |
$timeout = $r['timeout']; | |
if( ! is_float( $timeout ) ) { | |
return; |
This file contains hidden or 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 | |
// functions.php | |
define( 'CUSTOM_HOME_ID', 2 ); | |
function custom_should_index_post( $flag, WP_Post $post ) { | |
if ( $post->post_type === 'page' && $post->ID === CUSTOM_HOME_ID ) { | |
return false; | |
} | |
OlderNewer