Skip to content

Instantly share code, notes, and snippets.

View apherio's full-sized avatar
🎯
Focusing

Sahil Mhapsekar apherio

🎯
Focusing
View GitHub Profile
@apherio
apherio / map.geojson
Last active October 14, 2018 06:17 — forked from iotakodali/map.geojson
Basic plotting for sample view generation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@apherio
apherio / wp-author-import-auto-select.js
Created September 11, 2018 21:12 — forked from webercoder/wp-author-import-auto-select.js
Auto-select authors for posts during WordPress import. They must already be assigned to the project. Enable jQuery in a plugin or functions.php, and paste this in the browser console.
(function($){
$('#authors li').each(function(key, value) {
var name = $(this).children('strong').first().html();
var re = /\s\([^\)]+\)/gi;
name = name.replace(re, '');
$(this).find('select').first().children('option').each(function(){
if ($(this).html() == name) {
console.log('Comparing ' + $(this).html() + ' to ' + name + ".\n");
$(this).attr('selected', 'selected');