Skip to content

Instantly share code, notes, and snippets.

View colourgarden's full-sized avatar

Tom Hare colourgarden

View GitHub Profile
@colourgarden
colourgarden / bojan_db_design.skema
Last active March 9, 2020 16:05
the description for this gist
[{"name":"Players","color":"Red","position":{"x":100,"y":100},"increment":false,"timestamp":false,"softdelete":false,"column":[{"name":"name","type":"string","length":"100","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c41","order":0},{"name":"news","type":"string","length":"200","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c49","order":1},{"name":"id","type":"integer","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c57","order":2},{"name":"minutes","type":"integer","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hid
@colourgarden
colourgarden / config.json
Created September 11, 2018 17:55
Flynt custom post type
# theme/config/customPostTypes/location/config.json
{
"name": "location",
"label": "Locations",
"singular_label": "Location",
"description": "",
"public": true,
"show_ui": true,
"show_in_nav_menus": false,
@colourgarden
colourgarden / Preferences.sublime-settings
Last active January 22, 2018 08:52
Sublime Text 3 settings
{
"always_show_minimap_viewport": true,
"animation_enabled": false,
"auto_complete_selector": "source, text",
"binary_file_patterns": [".svn/", ".git/", "node_modules/", "bower_components/"],
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"default_line_ending": "unix",
@colourgarden
colourgarden / gulpfile.js
Created April 24, 2017 19:33
Avalanche CSS: sample lint gulpfile
var gulp = require('gulp'),
stylelint = require('gulp-stylelint');
gulp.task('lint', function () {
return gulp
.src('*.scss')
.pipe(stylelint({
reporters: [
{ formatter: 'string', console: true }
]
@colourgarden
colourgarden / markup.html
Created October 1, 2012 03:33
Quick and dirty removal of browse button from file inputs
<div class="file-input">
<input type="file">
</div>
@colourgarden
colourgarden / jquery.force-keypress-numeric.js
Created September 19, 2012 06:20
Ensure that the character entered is numeric. Useful for checkout quantity fields.
$('input').keydown(function(e){
// Make some allowances for: delete, backspace, tab and escape
if ( e.keyCode == 46 || e.keyCode == 8 || e.keyCode == 9 || e.keyCode == 27 ||
// Allow: Ctrl+A
( e.keyCode == 65 && e.ctrlKey === true ) ||
// Allow: home, end, left, right
( e.keyCode >= 35 && e.keyCode <= 39 )) {
// Let it happen, don't do anything
return;
}
@colourgarden
colourgarden / dabblet.css
Created February 3, 2012 16:02
CSS3 width transition. Animated vertical navigation.
/**
* CSS3 width transition. Animated vertical navigation.
*/
body{background: #fff; min-height:100%; font-family: Helvetica, Arial, sans-serif;}
ul{width: 30%; list-style: none; margin: 0; padding: 0; background: #eee;}
a{display: inline-block; min-width: 1px; background: #000; color: #fff; text-transform: uppercase; font-size: 1.143em; margin: 0.2em 0; padding: 0.85em; transition: all 0.25s ease; text-decoration: none;}
a:hover{min-width: 80%;/*alter depending on container and padding*/}
@colourgarden
colourgarden / dabblet.css
Created February 3, 2012 15:58
Spinning timer two
/**
* Spinning timer two
*/
html{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}
@colourgarden
colourgarden / txtQry.css
Created January 27, 2012 16:03
txtQry - CSS snippet for highlighting and annotating text queries during the website development stage via tooltips.
/* == txtQry CSS
========================================================================================================= */
[data-txtQry]{position: relative; background: #f3961c; cursor: help; padding: 2px;}
[data-txtQry]:after, [data-txtQry]:before{display: none; position: absolute;}
[data-txtQry]:after{top: -31px; width: auto; height: 24px; line-height: 23px; content: attr(data-txtQry); padding: 0 10px; white-space: nowrap; word-wrap: normal; font-size: 0.85em; border-radius: 0.3em; background: #222; color: #fff;}
[data-txtQry]:before{top: -7px; left: 10px; content: ""; border-width: 7px 7px 0; border-style: solid; border-color: #222 transparent;}
[data-txtQry]:hover:before, [data-txtQry]:hover:after{display: block;}
@colourgarden
colourgarden / dabblet.css
Created January 27, 2012 10:40
Spinning timer two
/**
* Spinning timer two
*/
html{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
}