In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
//SASS/COMPASS formatting i would like to have for organizational purpose. | |
#dashboard-content { | |
/*rule:value;*/ | |
&.my-account-v2 { | |
/*rule:value;*/ | |
.page { | |
/*rule:value;*/ | |
.inner { | |
/*rule:value;*/ | |
} |
# WEBRick server code | |
# - reading file specified per path, servlet then dynamically loads file and erb interprets the code inside of the .rhtml. | |
require 'webrick' | |
include WEBrick | |
require 'erb' | |
WEBrick::HTTPUtils::DefaultMimeTypes['rhtml'] = 'text/html' |
# webrick.rb | |
require 'webrick' | |
WEBrick::HTTPUtils::DefaultMimeTypes['rhtml'] = 'text/html' | |
server = WEBrick::HTTPServer.new :Port => 3000, :DocumentRoot => Dir.pwd | |
trap 'INT' do server.shutdown end | |
server.start |
# http://localhost:4567/ | |
require 'rubygems' | |
require 'sinatra' | |
get("/*.rb") do | |
`ruby #{request.path_info.slice(1..-1)}` | |
end |
# Project Folder Stracture | |
# =============================== | |
/mirteam-site/config.ru | |
/mirteam-site/favicon.ico | |
/mirteam-site/mirteam-sinatra-app.rb | |
/mirteam-site/README.markdown | |
# config.ru |
var serverSearchField = $("#txtSearchServer"); | |
var listServers = []; | |
serverSearchField.autocomplete({ | |
source: listServers | |
}); | |
serverSearchField.keyup(function (event) { | |
$.ajax({ | |
url: 'edit/EditService.svc/SearchServers', |
useJava () { | |
JDK6="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" | |
JDK7="/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home" | |
JDK8="/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home" | |
case "$1" in | |
"6") | |
echo "Using JDK6: ${JDK6}" | |
export JAVA_HOME="{$JDK6}/bin" |
var max = 128, | |
maxLength = max.toString().length > 1 ? max.toString().length : 2, | |
maxRoundedUp = Math.ceil(max/Math.pow(10,maxLength) * 10) * Math.pow(10,maxLength-1); |