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
<theme> | |
<!-- Window Style --> | |
<color id="foreground" red="1.0" green="0.776" blue="0.427" alpha="1.0" /> | |
<color id="background" red="0.255" green="0.255" blue="0.255" alpha="1.0" /> | |
<window foregroundColorID="foreground" backgroundColorID="background" shouldUseHUDScrollers="no" /> | |
<!-- Text View Style --> | |
<color id="tag" red="0.800" green="0.471" blue="0.200" alpha="1.0" /> | |
<color id="handle" extendsColorID="foreground" /> | |
<color id="insertionPoint" red="1.0" green="1.0" blue="1.0" alpha="1.0" /> |
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
#!/usr/bin/env bash | |
# | |
# url : https://gist.github.com/672684 | |
# version : 2.0.2 | |
# name : appify | |
# description : Create the simplest possible mac app from a shell script. | |
# usage : cat my-script.sh | appify MyApp | |
# platform : Mac OS X | |
# author : Thomas Aylott <oblivious@subtlegradient.com> |
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
/* | |
A Revised Font Stack | |
from A Way Back | |
http://www.awayback.com/revised-font-stack/ | |
*/ | |
/* |
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
/* | |
+----------------------------------------------------------------------------------------------------+ | |
| | | |
| TYPOGRIDPHY - TYPOGRAPHICAL AND GRID LAYOUT CSS FRAMEWORK FROM HARRY ROBERTS OF CSS WIZARDRY | | |
| | | |
+-------------------------------------------------+--------------------------------------------------+ | |
| | | | |
| TYPOGRIDPHY IS © COPYRIGHT OF HARRY ROBERTS | v 0.2.0 | | |
| IT IS FREE TO BE USED AND MODIFIED PROVIDED | May 2009 | |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
require 'fileutils' | |
class Jekyll < Thor | |
include FileUtils | |
method_options :format => :optional | |
def draft(name) | |
format = options[:format] || "markdown" | |
slug = name.downcase.gsub(/ +/,'-').gsub(/[^-\w]/,'').sub(/-+$/,'') | |
filename = slug + ".#{format}" |
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
{% comment%}<!-- | |
Be careful we do not want to access or iterate an array as an associative | |
array of associative arrays | |
We are cheating here by using | |
assign siteImgArrayObject to tell us what associative array to iterate over | |
out of collection of associative arrays. |
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
<script> | |
$(window).resize(function() { | |
var windowWidth = $(window).width(); | |
var bodyFontSize = $('body').css('font-size'); | |
var bodyFontSizeWithoutPx = parseInt(bodyFontSize); | |
var emValue = windowWidth/bodyFontSizeWithoutPx; | |
$('.screen-width').text(emValue + 'em'); | |
}); | |
</script> |
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
HTMLTextAreaElement.prototype.getCaretPosition = function () { //return the caret position of the textarea | |
return this.selectionStart; | |
}; | |
HTMLTextAreaElement.prototype.setCaretPosition = function (position) { //change the caret position of the textarea | |
this.selectionStart = position; | |
this.selectionEnd = position; | |
this.focus(); | |
}; | |
HTMLTextAreaElement.prototype.hasSelection = function () { //if the textarea has selection then return true | |
if (this.selectionStart == this.selectionEnd) { |
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
# Remove BOM from UTF-8 file | |
def unbomb(file) | |
string = File.open(file, 'r:utf-8').read().encode!('utf-8') | |
if string.start_with?("\uFEFF") | |
string.sub!(/\uFEFF/, '') # Remove the BOM | |
create_file file, string, {:force => true, :verbose => false} | |
end | |
end |
OlderNewer