Skip to content

Instantly share code, notes, and snippets.

View LukeXF's full-sized avatar
💻
Getting that bread

Luke Brown LukeXF

💻
Getting that bread
View GitHub Profile
@LukeXF
LukeXF / smb-embed.js
Last active April 20, 2019 11:33
SMB embed boats
console.log('test');
$( document ).ready(function() {
console.log('test2');
$.getJSON( "https://api.skippermyboat.com/listing/" + $(".smb-embed").attr('id'), function( data ) {
var items = [];
console.log(data.boat.basic);
var boat = data.boat;
var cdn = "https://cdn.skippermyboat.com/boat/";
var i = 0;
$.each( boat.media.photos, function( key, val ) {
[
{
"lat": 51.5073219,
"long": -0.1276474,
"name": "England",
"distance": 100
},
{
"lat": 38.7064968,
"long": 20.64176774,
<h3>Recently Added Boats</h3>
<h6 class="hidden-sm-up swipe-to-see-more">Swipe to see more</h6>
<div class="owl-carousel owl-theme">
{{#each config.homePageBoats}}
<div class="item">
<a href="listing/{{this.uniqueId}}">
@LukeXF
LukeXF / test.json
Last active November 5, 2017 06:14
{
userId: "",
name: "",
make: "",
model: "",
year: 2001,
value: 1000,
type: "",
text: "",
photos: ["url", "url"],
@LukeXF
LukeXF / boats.json
Last active November 4, 2017 22:13
A big list of boats
{
"AB Inflatables": {},
"ALLcraft": {},
"AMF Alcort": {},
"Abbott Boats": {},
"Able": {},
"Achilles Inflatable Craft": {},
"Action Craft Boats": {},
"Action Marine Inc.": {},
"Active Thunder Boats": {},
<?php
// Handles the site functions
class Accounts extends siteFunctions
{
/**
* load all Instagram accounts that belong to the logged in user
*
* @param integer session id
@LukeXF
LukeXF / csgo.php
Last active August 29, 2015 14:24
CSGO Store CSS - http://demo.luke.sx/csgo/
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link href='//fonts.googleapis.com/css?family=Open+Sans:700,400|Roboto:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
@LukeXF
LukeXF / gist:a785b395be0a784f43a4
Created June 27, 2015 22:31
A PHP skill test
<?php
// please fill-in the body of the functions
// using methods to produce the suggested output
/* function tests */
//echo remove_nonAtoZ("BA'3Ndf$%^A&*(nN)A")."</br>"."</br>";
//echo first_char_caps('TEST DATA bleh Orange')."</br>"."</br>";
//echo date_8_hours_ago()."</br>"."</br>";
//echo table_columns(array('apple', 'orange', 'monkey', 'potato', 'cheese', 'badger', 'turnip'), 2)."</br>"."</br>";
//
@LukeXF
LukeXF / functions.php
Created June 27, 2015 22:21
A PHP Test - Complete the functions
<?php
// Testing
// please fill-in the body of the functions
// using methods to produce the suggested output
/* config */
$db['host'] = "localhost";
$db['name'] = "luke_lsm";
$db['user'] = "luke_lsm";
@LukeXF
LukeXF / functions.php
Last active August 29, 2015 14:22
Jleeto
<?php
/**
* convert each of the APIs from JSON to Array
* @param string
* @return array
*/
function convertAPI($url) {
$api = $url;
$api_response = file_get_contents($api); // get content of url