This file contains hidden or 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
da or danish | |
nl or dutch | |
en or english | |
fi or finnish | |
fr or french | |
de or german | |
hu or hungarian | |
it or italian | |
nb or norwegian | |
pt or portuguese |
This file contains hidden or 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/bash | |
# Pre commit hook that prevents FORBIDDEN code from being commited. | |
# Add unwanted code to the FORBIDDEN array as necessary | |
FILES_PATTERN='\.(rb|js|coffee)(\..+)?$' | |
FORBIDDEN=( debugger ruby-debug ) | |
for i in "${FORBIDDEN[@]}" | |
do |
This file contains hidden or 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_id_attr = lambda do |obj| | |
if obj.is_a?(Hash) | |
obj.keys.each do |_k| | |
if _k.to_s.eql?('_id') | |
obj.delete(_k) | |
elsif obj[_k].is_a?(Hash) | |
remove_id_attr.call(obj[_k]) | |
elsif obj[_k].is_a?(Array) | |
obj[_k].each{|o| remove_id_attr.call(o)} | |
end |
This file contains hidden or 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
CRM.module("DashboardApp.Show", function(Show, CRM, Backbone, Marionette, $, _){ | |
Show.Dashboard = Marionette.Layout.extend({ | |
className: "container-fluid", | |
template: "backbone/crm/templates/dashboard/show", | |
regions: { | |
contacts: "#contacts", | |
filter: "#filter" | |
}, | |
origHeight: null, |
This file contains hidden or 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
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
# NEW WAY / EASY WAY | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.7.deb | |
sudo dpkg -i elasticsearch-0.90.7.deb |
This file contains hidden or 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
App.assets = { | |
// Returns an object containing all of asset pipeline's image paths. | |
// | |
// Sample: | |
// | |
// { | |
// avatars/missing_avatar.png: "/assets/avatars/missing_avatar.png" | |
// chosen-sprite.png: "/assets/chosen-sprite.png" | |
// circle_green.png: "/assets/circle_green.png" | |
// circle_orange.png: "/assets/circle_orange.png" |
This file contains hidden or 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
:javascript | |
window._popup_closed = function(){ | |
location.href = "#{@my_instance_var_uri_string}"; // replace the opening window document with this one | |
window._popup_closed = null; // remove on close callback | |
}; | |
var connect_path = "/auth/#{@platform name}"; // the oauth destination - there is a route for these | |
var new window_specs = ""; // your window opening parameters | |
// open the new window |
This file contains hidden or 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
sudo apt-get install zlib1g-dev openssl libopenssl-ruby1.9.1 libssl-dev libruby1.9.1 libreadline-dev git-core make | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
mkdir -p ~/.rbenv/plugins | |
cd ~/.rbenv/plugins | |
git clone git://github.com/sstephenson/ruby-build.git | |
rbenv install 1.9.3-p194 | |
rbenv rehash |
This file contains hidden or 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
var large_photo_url = options.picture_url.replace(/_[a-z]\.[a-z]{3}$/i, | |
"_n"+options.picture_url.match(/\.[a-z]{3}$/i)[0]); |