View node_cheerio_scraping.js
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 request = require('request'); | |
const cheerio = require('cheerio'); | |
const fs = require('fs'); | |
const writeStream = fs.createWriteStream('post.csv'); | |
// Write Headers | |
writeStream.write(`Title,Link,Date \n`); | |
request('http://codedemos.com/sampleblog', (error, response, html) => { | |
if (!error && response.statusCode == 200) { |
View example.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
<?php | |
$query = <<<'GRAPHQL' | |
query GetUser($user: String!) { | |
user (login: $user) { | |
name | |
repositoriesContributedTo { | |
totalCount | |
} |
View .eslintignore
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
**/*.min.js | |
**/node_modules/** | |
**/vendor/** | |
build | |
coverage | |
cypress | |
node_modules | |
vendor |
View multisite-recap-boilerplate.txt
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
Post Title: | |
Multisite Recap for the week of {F jS (month + day)} | |
----------------------------- | |
Post Content: | |
<h2>Office Hours Recap</h2> | |
The <a href="https://make.wordpress.org/core/{Y}/{m}/{d}/multisite-agenda-for-the-week-of-{F}-{jS}/">agenda for this office hours meeting</a> included/was {(brief one-sentence description of original meeting agenda)}. |
View multisite-agenda-boilerplate.txt
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
Post Title: | |
Multisite Agenda for the week of {F jS (month + day)} | |
----------------------------- | |
Post Content: | |
<h2>Office Hours Agenda</h2> | |
This is the agenda for the weekly office hours meeting on [time relative]Tuesday 16:00 UTC[/time] in <a href="https://wordpress.slack.com/archives/core-multisite">#core-multisite</a>. |
View custom-modal-metabox.js
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 {Object} JavaScript namespace for our application. | |
*/ | |
var Custom_Modal = {}; | |
(function($, Custom_Modal) { | |
var $ = jQuery; | |
_.extend( Custom_Modal, { view: {}, controller: {} } ); |
View admin.css
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
.sortable_wordpress_gallery li.attachment { | |
width: 141px; | |
height: 141px; | |
} | |
.sortable_wordpress_gallery { | |
display: block; | |
} | |
.sortable_wordpress_gallery:after { | |
display: table; | |
content: ''; |
View gist:70b00c97df43827279f7
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
#! /bin/bash | |
# This if for the mac hipchat client | |
# To setup, download this file to any folder and save as `hip.sh` | |
# change the permissions of the file so it is executable using terminal | |
# You can do this by running `chmod u+x ./hip.sh` | |
# Now you can run `./hip.sh` | |
echo 'Hipchat hooray...ho... - Press CTRL+C to stop' | |
while : | |
do |
View lift-comment-facet.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
<?php | |
define( 'lift_comment_facet_version', 1 ); | |
add_action( 'init', function() { | |
if ( class_exists( 'Lift_Search' ) ) { | |
//field name, field type | |
$comment_field = liftField( 'comment_count', 'uint' ) | |
//add field to parse_request handling so it gets passed to the global WP_Query | |
->addRequestVars( 'comment_count' ) | |
//set the delegate for adding the field value to the document sent to CS |
View wp-customize-image-reloaded.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
<?php | |
/** | |
* Customize Image Reloaded Class | |
* | |
* Extend WP_Customize_Image_Control allowing access to uploads made within | |
* the same context | |
*/ | |
class My_Customize_Image_Reloaded_Control extends WP_Customize_Image_Control { | |
/** | |
* Constructor. |
NewerOlder