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/env bash | |
function read_yes_no() | |
{ | |
if [ "$1" = "-y" -o "$1" = "y" ]; then | |
{ | |
yesno="y"; | |
echo "y"; | |
echo "Skipping...as -y was given"; | |
} |
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 | |
$tag = 'horse'; | |
$scrape = scrape_ig_tag($tag); | |
function scrape_ig_tag($tag) { | |
$ig_url = file_get_contents('https://www.instagram.com/explore/tags/'.$tag.'/'); // instagrame tag url | |
$shards = explode('window._sharedData = ', $ig_url); | |
$ig_json = explode(';</script>', $shards[1]); | |
$ig_data = json_decode($ig_json[0], TRUE); | |
return $ig_data; // the whole shebang |
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 | |
///* | |
//Plugin Name: MODX importer | |
//Plugin URI: http://gho.nl/ | |
//Description: Import newsitems from MODX. | |
//Version: 1.0 | |
//Author: Wouter Groenewold | |
//License: GPL | |
//Copyright: GH+O Communicatie | |
//*/ |
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
function updateIndexNumbers($postid) { | |
$post = get_post($postid); | |
if ($post->post_type == 'project') { | |
$args = array( | |
'post_type' => 'project', | |
'posts_per_page' => -1, | |
'post_status' => 'publish', | |
'order' => 'ASC', | |
'orderby' => 'date' |
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 | |
/* | |
* Initial doorbell. | |
* | |
* @todo: Twitter connection | |
* @todo: Storage with timestamp to generate heatmaps | |
* @todo: Spaceapi.net eraan knopen. | |
*/ |
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
Link real bank accounts to RevBank accounts | |
Read mutations | |
Substract "lidmaatschap" (note: administrate this somewhere as well? No consumption if no lidmaatschap paid for 2 months?) | |
Put leftover amount in RevSpace bank |
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 | |
require_once __DIR__ . '/vendor/autoload.php'; | |
use ohmy\Auth2; | |
# do 3-legged oauth | |
$yammer = Auth2::legs(3) | |
# configuration | |
->set(array( |
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 | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
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
var gallerycf = json.post.custom_fields.gallerij[0]; | |
gallerycf = gallerycf.split('{'); | |
gallerycf = gallerycf[1].split(';'); | |
var items = []; | |
for(i=0; i<gallerycf.length; i++){ | |
if(i % 2 !== 0){ | |
items.push(gallerycf[i]); | |
} | |
} |
NewerOlder