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
//First scroll through the FB Page invite list and then run this code through Developers console | |
//NOte: It's limited to 255 people at once | |
(function() { | |
var aa = document.querySelectorAll("div[role=checkbox]"); | |
for (var i = 0; i < aa.length; i++){ | |
aa[i].click(); | |
} | |
})() |
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
import arcpy | |
import pandas as pd | |
def arcgis_table_to_df(in_fc, input_fields=None, query=""): | |
"""Function will convert an arcgis table into a pandas dataframe with an object ID index, and the selected | |
input fields using an arcpy.da.SearchCursor. | |
:param - in_fc - input feature class or table to convert | |
:param - input_fields - fields to input to a da search cursor for retrieval | |
:param - query - sql query to grab appropriate values | |
:returns - pandas.DataFrame""" |
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
window.onscroll = function() { | |
var offset = 100; //set offset from bottom | |
var loading = false; | |
var scrolledToOffset = document.documentElement.scrollTop + window.innerHeight + offset > document.documentElement.offsetHeight; | |
if ( scrolledToOffset && !loading ) { | |
function() { | |
loading = true; //block running function more than once before finishing previous request | |
//do something when reaching offset from bottom; e.g. load more content with AJAX | |
loading = false; //pass this in callback function when using async call | |
} |
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 | |
/** | |
* @param WP_Query|null $wp_query | |
* @param bool $echo | |
* | |
* @return string | |
* Accepts a WP_Query instance to build pagination (for custom wp_query()), | |
* or nothing to use the current global $wp_query (eg: taxonomy term page) | |
* - Tested on WP 4.9.5 |