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
// Usage: | |
// Create a dynamic textfield with linkage name helloworld_txt and give it an initial value of '{{hello}} {{world}}!' | |
// add the function substitute below to a static class or put it somewhere in your project | |
// call it by passing the textfield name first and an object of key values to replace second | |
Helpers.substitute(helloworld_txt, {hello: 'It', world: 'Works' }); | |
// run the file, the textfield should now say "It Works!" |
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
bash-3.2$ brew install -v ffmpeg | |
Also installing dependencies: libvorbis, theora, libvpx, xvid | |
==> Downloading http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2 | |
File already downloaded and cached to /Users/john/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/john/Library/Caches/Homebrew/libvorbis-1.3.2.tar.bz2 | |
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libvorbis/1.3.2 | |
./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libvorbis/1.3.2 | |
checking build system type... i386-apple-darwin10.7.4 | |
checking host system type... i386-apple-darwin10.7.4 | |
checking target system type... i386-apple-darwin10.7.4 |
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
!!! | |
/[if lt IE 7] <html class="no-js ie6 oldie" lang="en"> | |
/[if IE 7] <html class="no-js ie7 oldie" lang="en"> | |
/[if IE 8] <html class="no-js ie8 oldie" lang="en"> | |
<!--[if (gt IE 8)]><html lang="en" class="no-js"><![endif]--> | |
%head | |
%meta{charset: "utf-8"} | |
%meta{:content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible"} | |
%title 'Rails 3.1.1 barebones HTML5Boilerplate' |
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
def remote_ip | |
if forwarded = request.env["HTTP_X_FORWARDED_FOR"] | |
forwarded.split(",").first | |
elsif addr = request.env["REMOTE_ADDR"] | |
addr | |
end | |
end |
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
# As root user | |
sudo su | |
# Update the OS | |
sudo apt-get update -y | |
# Add this to ~/.bashrc to remove timezone warnings | |
echo 'export LC_ALL="en_US.UTF-8"' >> ~/.bashrc | |
source ~/.bashrc |
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
Linode 512MB / 20GB / 200GB Transfer = 12.69 | |
Rackspace / 7.30 + 1.46 = 8.76 | |
Rackspace / 14.06 + 2.81 = 16.87 | |
Linode 12.69 * 2 = 25.38 inc VAT | |
Rackspace 14.06 + 7.30 = 21.36 ex VAT = 25.62 inc VAT |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Source</title> | |
<meta charset="UTF-8"> | |
<script type="text/javascript"> | |
history.replaceState(null, null, String.fromCharCode(8238) + 'lmth.ecruos'); | |
</script> | |
</head> | |
<body> |
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
@mixin opacity($alpha) { | |
// IE 8 | |
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=$alpha*100)"; | |
// IE 5-7 | |
filter: alpha(opacity=$alpha*100); | |
// Real Browsers | |
-webkit-opacity: $alpha; | |
-moz-opacity: $alpha; | |
-khtml-opacity: $alpha; | |
opacity: $alpha; |
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
PROMPT='%{$fg_bold[yellow]%}⚡%{$fg_bold[green]%}%p %{$fg[cyan]%}%c%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
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
<!-- | |
1. REMOVE //= require jquery IN application.js | |
2. ADD config.assets.precompile += %w( jquery.js ) IN production.rb | |
--> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script>window.jQuery || document.write("<%= j javascript_include_tag "jquery" %>")</script> | |
<%= javascript_include_tag "application" %> |
OlderNewer