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 | |
// just because this isn't wordpress.. | |
$dummy_post = array('title'=>'the post name', 'body'=>'some post content'); | |
$posts = array($dummy_post ,$dummy_post ,$dummy_post,$dummy_post,$dummy_post,$dummy_post ); | |
$track_count = 0; | |
$posts_output = []; | |
foreach ($posts as $index => $post) { | |
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
{ | |
"autoload": { | |
"classmap": [ | |
"database" | |
], | |
"psr-4": { | |
"App\\": "app/" | |
}, | |
"files": ["app/Libraries/metapack_client_v5.php"] |
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 | |
$addresses = explode('||',file_get_contents('https://ukpoliceimageappeal.co.uk/postcode/lookup?code=m146pb')); | |
if (count($addresses)) { | |
foreach ($addresses as $address) { | |
echo str_replace('//',', ',str_replace(' ','',$address)); | |
echo "<hr>"; | |
} | |
} | |
?> |
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
#include <Servo.h> | |
Servo myservo; // create servo object to control a servo | |
int pos = 0; // variable to store the servo position | |
String inputString = ""; // a String to hold incoming data |
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 | |
// P.D / TakesTheBiscuit proof of concept 9-2-2018 21:00 | |
// This small demo shows how you can send an input template | |
// .. back to an api client (for example) which can then be auto populated | |
Class micro_api { | |
public function getResponse($input_id) { | |
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 | |
$str = json_encode(['test'=>true]); | |
$obj = json_decode($str); | |
var_dump($obj); | |
echo PHP_EOL.'<br>'; | |
$keys = [ | |
'tests', |
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 | |
// If you are using Composer (recommended) | |
require 'vendor/autoload.php'; | |
// If you are not using Composer | |
// require("path/to/sendgrid-php/sendgrid-php.php"); | |
$from = new \SendGrid\Email("Example User", "[email protected]"); | |
$subject = "Sending with SendGrid is Fun"; | |
$to = new \SendGrid\Email("Example User", "[email protected]"); |
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 | |
$wildcard_array = explode(' ', 'Delivered to neighbouring city signed for by github.com/TAKESTHEBISCUIT'); | |
echo '<pre>'; | |
print_r(reverseWildcard($wildcard_array)); | |
echo '</pre>'; | |
function reverseWildcard($wildcard_arr_of_words) { | |
$working_arr = $wildcard_arr_of_words; | |
$sentences = []; | |
if ($wildcard_arr_of_words != false) { |
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 | |
$arr = ["7", | |
"13", | |
"4", | |
"5", | |
"13", | |
"18", | |
"28", | |
"7", |
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 | |
$stringage = [ | |
'order_id'=>'5678', | |
'name'=>'NO ONE cares' | |
]; | |
echo replace_with_personal_data('There was a problem on order #[order_id] please phone [name]', $stringage); | |
OlderNewer