This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
# This is a script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# Run in interactive mode with: | |
# $ sh -c "$(curl -sL https://gist.github.com/nicinabox/5049538/raw/dce40fa5a064c3d6a4ae5464b1213bab2ca3035f/hack.sh)" | |
# | |
# or run it without prompt questions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html, <body style="background: #fdfdfd"> <textarea style="font-size: 1.5em; width: 60%; height: 100%; margin: 5% auto; border: none; outline: none; display: block; background: transparent" autofocus onkeyup="javascript:localStorage['note'] += this.value "/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chain INPUT (policy ACCEPT) | |
target prot opt source destination | |
Chain FORWARD (policy ACCEPT) | |
target prot opt source destination | |
Chain OUTPUT (policy ACCEPT) | |
target prot opt source destination | |
Chain RH-Firewall-1-INPUT (0 references) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Augment the api with size | |
$.fn.superslides.api.size = $("." + $.fn.superslides.options.container_class).children().length; | |
$(document).on('slides.animated', function(e, current, next, prev) { | |
var size = $.fn.superslides.api.size; | |
// Fix for next bug | |
next = next + 1; | |
if (current === 0) { | |
console.log('first slide'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on('slides.animated', '#slides', function(e, current, next, prev) { | |
if (current < prev) { | |
// first | |
} | |
if (current > next) { | |
// last | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class window.Domain extends Backbone.Model | |
initialize: -> | |
@on 'error', (model, errors) -> | |
console.log errors | |
validate: (attrs) -> | |
errors = [] | |
domains = _.pluck app.Domains, 'url' | |
if _.include(domains, attrs.url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#slides').superslides().hover(function() { | |
$(this).superslides('stop'); | |
}, function() { | |
$(this).superslides('start'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.showHint = function() { | |
var $data = this.data('content'); | |
return this.each(function(i) { | |
$(this).empty().html($data[$(this).val()]); | |
}); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% capture reading_time %} | |
{{ 150 | divided_by: 150 }} | |
{% endcapture %} | |
<span> | |
Reading time: about {{ reading_time }} | |
{% if reading_time == 1 %} | |
minute | |
{% else %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Author: Nic Aitch - @nicinabox | |
Version: 1.1 | |
Description: Basic device properties for use when checking screen size or mobile. | |
License: MIT | |
*/ | |
(function(window, document, undefined) { | |
var device = {}; |