Skip to content

Instantly share code, notes, and snippets.

View xavez's full-sized avatar

Xavier Bertels xavez

View GitHub Profile
@xavez
xavez / SketchSystems.spec
Created July 10, 2018 08:15
Open Home Schedule
Open Home Schedule
Empty State
tap add open home -> Datepicker First Time
Filled State
Datepicker First Time
tap cancel -> Empty State
tap done -> Timepicker Start Date
Datepicker
Timepicker Start Date
tap cancel -> Empty State
@xavez
xavez / SketchSystems.spec
Created June 27, 2018 11:45
Not Searching*
Not Searching*
start search -> Searching
List of Matches
Searching
clear search -> Not Searching
search in matches -> Search in matches
search all properties -> Search all properties
Search in matches
Search all properties
@xavez
xavez / Preferences.sublime-settings
Created September 5, 2017 16:17
Sublime Text 3 Settings
{
"caret_extra_width": 1,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Afterglow/Afterglow.tmTheme",
"enable_live_count": true,
"enable_readtime": true,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.scssc",
@xavez
xavez / ios8-transparent-statusbar.js
Created February 27, 2015 16:18
Full-screen web-apps in iOS8 need some hackery to have a transparent navbar that displays black text on your app’s light background
if (('standalone' in window.navigator) && window.navigator.standalone)
{document.write('<meta name="apple-mobile-web-app-status-bar-style" content="default">');}
else
{document.write('<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">');}
@xavez
xavez / backup.mysql.local.sh
Last active December 30, 2015 13:59
Backup local mysql databases. Symlink to latest backup. Run with launchd or cron at regular intervals.
#!/bin/bash
# Path to where you want to backup mysql databases.
opath=/Users/username/Sites/Backups/mysql/
# Local mysql details. Make a username with only read access. Allow SELECT, LOCK TABLES.
mysqlhost=127.0.0.1
username=read_only_user
password=read_only_password
@xavez
xavez / appmode.js
Created November 7, 2013 15:46
jQuery script to turn a normal website into an iOS fullscreen web app by routing all links through javascript.
$(document).on(
"click",
"a",
function (e) {
e.preventDefault();
location.href = $( e.target ).attr( "href" );
}
);
@xavez
xavez / Gemfile
Last active December 24, 2015 01:39
Prototyping Guard setup Use Compass, Jekyll and LiveReload to compile static prototypes. `cd`to project directory `bundle install` `bundle exec guard`
# ~/Gemfile
source "http://rubygems.org"
group :development do
# CSS Preprocessing
gem 'sass'
gem 'compass'
gem 'jekyll'
@xavez
xavez / Gruntfile.js
Last active August 2, 2016 05:20
Grunt: Compass, Autoprefixer, CSS/JS minification and Livereload. Use the `npm install`and `grunt` commands consecutively to execute.
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
@xavez
xavez / Gemfile
Last active December 21, 2015 10:39
Static site Guard setup. Use Compass, Jammit, Jekyll and LiveReload to compile static sites. 1. `cd` into project root 2. `gem update --system && gem install bundler && bundle install` 3. `bundle exec guard`
# ~/Gemfile
source "http://rubygems.org"
group :development do
# CSS Preprocessing
gem 'sass'
gem 'compass'
gem 'jekyll'
gem 'closure-compiler'
@xavez
xavez / image.xml
Last active October 4, 2015 19:58
Responsive Images
<img src="image.jpg" setsrc="image.xml" />
<!-- And your image.xml being something like -->
<img media="screen and (min-width:500px)">
<coords>
<rect width="700" height="550" x="0" y="0" id="square" />
</coords>
<source>image.jpg</source>
</img>