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
<apex:page controller="CustomSettingController"> | |
<apex:pageMessages id="msgs" /> | |
<apex:form id="theform"> | |
<apex:inputField value="{!cs.Field1__c}" /> | |
<apex:inputField value="{!cs.Field2__c}" /> | |
<apex:commandButton value="{!$Label.CSTab_Save}" action="{!update}" rerender="msgs,theform" /> | |
</apex:form> | |
</apex:page> |
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
after "deploy:symlink", "deploy:restart_workers" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') | |
cmd = "cd #{fetch(:latest_release)} && #{fetch(:rake, "rake")} RAILS_ENV=#{fetch(:rails_env, "production")} #{rake_cmd}" |
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
MBProgressHUD.showHUDAddedTo(@view, animated:true) | |
BW::Reactor.defer(proc do | |
@posts = Post.query.find | |
end, proc do | |
MBProgressHUD.hideHUDForView(@view, animated:true) | |
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
# THIS CODE IS VERY UGLY | |
# I AM NOT SORRY | |
# Copyright 2013 Kyle Varga | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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
<apex:page controller="CustomerCommunityController" id="customercommunitycontroller" sidebar="false" showHeader="false" standardStylesheets="false" > | |
<head> | |
<title>Acme Customer Support</title> | |
<meta charset="utf-8" /> | |
<apex:includeScript value="{!$Resource.jquery}"/> | |
</head> | |
<script type="text/javascript"> | |
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 getLocaleDateString(){ | |
var formats ={"ar-SA":"dd/mm/yy","bg-BG":"dd.m.yyyy","ca-ES":"dd/mm/yyyy","zh-TW":"yyyy/m/d","cs-CZ":"d.m.yyyy", | |
"da-DK":"dd-mm-yyyy","de-DE":"dd.mm.yyyy","el-GR":"d/m/yyyy","en-US":"m/d/yyyy","fi-FI":"d.m.yyyy","fr-FR":"dd/mm/yyyy", | |
"he-IL":"dd/mm/yyyy","hu-HU":"yyyy. mm. dd.","is-IS":"d.m.yyyy","it-IT":"dd/mm/yyyy","ja-JP":"yyyy/mm/dd", | |
"ko-KR":"yyyy-mm-dd","nl-NL":"d-m-yyyy","nb-NO":"dd.mm.yyyy","pl-PL":"yyyy-mm-dd","pt-BR":"d/m/yyyy", | |
"ro-RO":"dd.mm.yyyy","ru-RU":"dd.mm.yyyy","hr-HR":"d.m.yyyy","sk-SK":"d. m. yyyy","sq-AL":"yyyy-mm-dd", | |
"sv-SE":"yyyy-mm-dd","th-TH":"d/m/yyyy","tr-TR":"dd.mm.yyyy","ur-PK":"dd/mm/yyyy","id-ID":"dd/mm/yyyy", | |
"uk-UA":"dd.mm.yyyy","be-BY":"dd.mm.yyyy","sl-SI":"d.m.yyyy","et-EE":"d.mm.yyyy","lv-LV":"yyyy.mm.dd.", | |
"lt-LT":"yyyy.mm.dd","fa-IR":"mm/dd/yyyy","vi-VN":"dd/mm/yyyy","hy-Am":"dd.mm.yyyy","az-Latn-AZ":"dd.mm.yyyy", | |
"eu-ES":"yyyy/mm/dd","mk-mK":"dd.mm.yyyy","af-ZA":"yyyy/mm/dd","ka-GE":"dd.mm.yyyy","fo-FO":"dd-mm-yyyy", |
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
// Write a general-purpose reducer that excludes items based on a predicate | |
function excludeReducer(predicate) { | |
return function(newArray, item) { | |
return predicate(item) ? newArray : newArray.concat(item); | |
} | |
} | |
function excludeIdReducer(id) { | |
return excludeReducer(function(item) { |
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
angular.module('myApp').config(['$httpProvider', function($httpProvider) { | |
delete $httpProvider.defaults.headers.common['X-Requested-With']; | |
}); |
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
@font-face { | |
font-family: 'icomoon'; | |
src: url('fonts/icomoon.eot'); | |
} | |
@font-face { | |
font-family: 'icomoon'; | |
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8ywAAAC8AAAAYGNtYXDgfOaMAAABHAAAAERnYXNwAAAAEAAAAWAAAAAIZ2x5ZlRMFxoAAAFoAAA6WGhlYWQASAk3AAA7wAAAADZoaGVhB8ID+wAAO/gAAAAkaG10eOIADMUAADwcAAAA6GxvY2GdD5AIAAA9BAAAAHZtYXhwAEMBLQAAPXwAAAAgbmFtZUQXtNYAAD2cAAABOXBvc3QAAwAAAAA+2AAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAgPA/8D/wAPAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEADAAAAAIAAgAAgAAACDgNOYC//8AAAAg4ADmAP///+EgAho3AAEAAAAAAAAAAAABAAH//wAPAAEAAAAAAAAAAAACAAA3OQEAAAAAAQBRABEDrgNuAFMAAAEuASIGBwEOARQWFx4BMjY3AT4BNCYnLgEiBg8BDgEUFhceATI2PwE+ATIWFx4BFAYHAQ4BIiYnLgE0NjcBPgEyFhceARQGDwEeAxc3PgE0JicDrihmamYp/isoKCgoKWZqZigBIBkZGRkZP0I/GbQKCgoKCRcYFwm1BhAQEAYGBgYG/uAWNzk3FhYWFhYB1RY3OTcWFhYWFgQLEQwHAS4pKSkpA24pKSkp/isoZmpmKSgoKCgBIBk/Qj8ZGRkZGbUJFxgXCQoKCgq0BgYGBgYQEBAG/uEWFhYWFjc5NxYB1RYWFhYWNzk3FgQPICIjEi4pZmpmKAA |
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 ( | |
and ( | |
YEAR(Date_Start__c) == YEAR(TODAY()), | |
IF( | |
CEILING( ( Date_Start__c - DATE( YEAR( Date_Start__c ), 1, 1) + 1) / 7) > 52, | |
52, | |
CEILING( ( Date_Start__c - DATE( YEAR( Date_Start__c ), 1, 1) + 1) / 7) | |
) == | |
IF( |