Skip to content

Instantly share code, notes, and snippets.

View Tom-Millard's full-sized avatar
🏠
Working from home

Tom Millard Tom-Millard

🏠
Working from home
View GitHub Profile
$default_rounded_amount: 5px
// Round corner at position by amount.
@mixin round-corner($position, $amount: $default_rounded_amount)
border-#{$position}-radius: $amount
-webkit-border-#{$position}-radius: $amount
@mixin round-corner-mozilla($position, $amount: $default_rounded_amount)
-moz-border-radius-#{$position}: $amount
// Round left corners by amount
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.14/angular.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<br />
<br />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.upload-button {
height : 30px;
overflow : hidden;
}
@Tom-Millard
Tom-Millard / index.html
Created October 13, 2014 12:46
[add your bin description] // source http://jsbin.com/kapita/59
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]" />
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
/*
Fancy rotating button using CSS3 animations
*/
@Tom-Millard
Tom-Millard / googleMaps
Created October 16, 2014 14:16
Get the country based on latlong
// watch out for google api cut off
class googleMaps {
private $latlong = "";
private $json = "";
private $log = array();
private $break = false;
public function __construct($latlong) {
@Tom-Millard
Tom-Millard / curl_get_image
Created October 16, 2014 14:18
Curl get image and data
<?php
class curl_get_image{
private $image_name = "";
private $data = "";
private $dir = "";
private $details = array();
@Tom-Millard
Tom-Millard / distance
Created October 16, 2014 14:20
Distance between two points by postcode
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace distance
{
class distance
{
@Tom-Millard
Tom-Millard / gen_secure_id
Created October 16, 2014 14:23
Create secure string
function gen_secure_id($size){
$char = range("a", "z");
$numb = range(1, 9);
$merge = array_merge($char, $numb);
$string = "";
for($x=0; $x != $size; $x++){
$n = "";
@Tom-Millard
Tom-Millard / gist:55c8fb214e8aaed9b31d
Last active August 29, 2015 14:19
Custom Laravel Pagination View with Font Awesome
@if ($paginator->getLastPage() > 1)
<ul class="pagination">
<li>
<a href="{{ $paginator->getUrl(1) }}" class="pagination__item-{{ ($paginator->getCurrentPage() == 1) ? ' pagination__disabled' : '' }} btn pagination__option"><i class="fa fa-arrow-circle-left"></i> Previous</a>
</li>
@for ($i = 1; $i <= $paginator->getLastPage(); $i++)
<li>
<a href="{{ $paginator->getUrl($i) }}" class="pagination__item-{{ ($paginator->getCurrentPage() == $i) ? ' pagination__active' : '' }} btn pagination__option">{{ $i }}</a>
</li>
@Tom-Millard
Tom-Millard / gist:2ecd74070051dab29136
Created June 11, 2015 10:50
Hamburger Menu Button
.btn {
background : none;
border : 0;
border-radius : 0px;
}
.btn--menu-trigger {
@extend .btn;
border: 2px solid white;
padding: 6px;