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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :define_rss_feed | |
def define_rss_feed | |
@blogposts = RSS::Parser.parse(open('http://www.jerevedunemaison.com/feed').read, false).items[0,1,2] | |
end | |
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
{ | |
"user_profile": { | |
"values": [ | |
{ | |
"title":"User profile", | |
"image_src":"/c360/customer360/images/employees_pictures/C360Emp71.jpg" | |
} | |
] | |
}, | |
"performances": { |
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
action_url: "customer360/index.html?q=_uid:17a720741c49433fa8af41fff959b512&_e_view=salesForces", | |
image_src: "./resources/ui/default/images/facet/Customer_ID/w145/Cust24.jpg", | |
name: "Willkie Farr & Gallagher LLP", | |
values: [ | |
{'count': 9, label: "Alerts", shortLabel: "Alerts"}, | |
{'count': 9, label: "News", shortLabel: "News"}, | |
{'count': 9, label: "Threats", shortLabel: "Threats"}, | |
{'count': 9, label: "Opportunities", shortLabel: "Opp."} | |
] |
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
action_url: "customer360/index.html?q=_uid:17a720741c49433fa8af41fff959b512&_e_view=salesForces", | |
alertsCount: 1, | |
image_src: "./resources/ui/default/images/facet/Customer_ID/w145/Cust24.jpg", | |
name: "Willkie Farr & Gallagher LLP", | |
newsCount: 3, | |
opportunitiesCount: 2, | |
threatsCount: 4 |
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
[ | |
{ | |
type: 'doughnut', | |
name: 'Satisfaction', | |
value: 6, | |
max: 10, | |
color: '#e58d51' | |
}, | |
{ | |
type: 'doughnut', |
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
if ( | |
(function(){ | |
var el = document.createElement('div'), | |
bs = 'backgroundSize', | |
ubs = bs.charAt(0).toUpperCase() + bs.substr(1), | |
props = [bs, 'Webkit' + ubs, 'Moz' + ubs, 'O' + ubs]; | |
for ( var i in props ) { | |
if ( el.style[props[i]] !== undefined ) { | |
return true; |
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
If you want your terminal vim to open files you double click, follow the following steps (MacOS only): | |
1. Open Automator | |
2. Select Application | |
3. Copy the attached file | |
4. Save and set as default for opening files | |
Multiple files are opened in vim tabs. | |
If there is already a vim instance running, files are opened in it. |
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
function drawInfoBulle (style, image, text) { | |
var infoBulle = document.getElementById("infoBulle"), | |
infoBulleImg = document.getElementById("infoBulleImg"), | |
infoBulleTxt = document.getElementById("infoBulleTxt"); | |
infoBulle.style.margin = style; | |
infoBulleImg.innerHTML = image; | |
infoBulleTxt.innerHTML = text; | |
} |
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
- prefix = Rails.env.production? ? '' : (Rails.env + ":") | |
:javascript | |
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0. |
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
import UIKit | |
import RealmSwift | |
import TTTabBar | |
let realm = try! Realm() | |
let octoClient = OctolyClient( | |
baseUrl: "https://www.octoly.com/api", | |
apiVersion: "v1") | |
var currentUser:User? = realm.objects(User).first; |