start new:
tmux
start new with session name:
tmux new -s myname
=semantic_form_for [:admin, @dog], validate: true, html: {multipart: true} do |f| | |
=f.inputs do | |
=f.input :name | |
=f.input :kennel_name | |
=f.input :birthdate | |
=f.input :gender, as: :radio, collection: {'Tik' => 'F', 'Hane' => 'M'} | |
=f.input :father_id, as: :select, collection: @dogs | |
=f.input :mother_id, as: :select, collection: @bitches | |
=f.semantic_fields_for :pictures do |pic| |
function hideAddressBar() | |
{ | |
if(!window.location.hash) | |
{ | |
if(document.height < window.outerHeight) | |
{ | |
document.body.style.height = (window.outerHeight + 50) + 'px'; | |
} | |
setTimeout( function(){ window.scrollTo(0, 1); }, 50 ); |
Highcharts.Chart.prototype.callbacks.push(function(chart) { | |
var hasTouch = document.documentElement.ontouchstart !== undefined, | |
mouseTracker = chart.tracker, | |
container = chart.container, | |
mouseMove; | |
mouseMove = function (e) { | |
// let the system handle multitouch operations like two finger scroll | |
// and pinching | |
if (e && e.touches && e.touches.length > 1) { |
[ | |
// Drawn from http://www.sublimetext.com/forum/viewtopic.php?f=2&t=7477#p31755 | |
// Kills the annoying default of cmd-left jumping to the start of a line's | |
// code, rather than column 0. | |
{ "keys": ["super+left"], "command": "move_to", "args": {"to": "hardbol", "extend": false} }, | |
{ "keys": ["super+right"], "command": "move_to", "args": {"to": "hardeol", "extend": false} } | |
] |
angular.module('app.resources', ['ngResource']) | |
.factory('api', function ($resource) { | |
var api = { | |
defaultConfig : {id: '@id'}, | |
extraMethods: { | |
'update' : { | |
method: 'PUT' | |
} |
(function () { | |
'use strict'; | |
/** | |
* @ngdoc directive | |
* @name app.directive:unsavedForm | |
* @description | |
* Angular directive that's fires a confirmation modal on unsaved form (if form touched) | |
* @author Marco Martins | |
* https://gist.github.com/skarface |