Sample
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
// downloaded from https://d2l6uygi1pgnys.cloudfront.net/jsapi/0-5/hsp.js? | |
// to fix a bug in Hootsuite SDK | |
var hsp = {}; | |
(function () { | |
hsp = new function () { | |
var g = "https:" == document.location.protocol ? "https://" : "http://", | |
q = g + "d2l6uygi1pgnys.cloudfront.net/jsapi/0-5/assets", | |
r = g + "d2l6uygi1pgnys.cloudfront.net/jsapi/json2.js", | |
j = "https:" == document.location.protocol ? "https://" : "http://", | |
l = !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
var large_photo_url = options.picture_url.replace(/_[a-z]\.[a-z]{3}$/i, | |
"_n"+options.picture_url.match(/\.[a-z]{3}$/i)[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
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 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 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 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 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 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 |
OlderNewer