Skip to content

Instantly share code, notes, and snippets.

Rails.application.routes.draw do
mount DbxAppsEngine::Engine => '/'
end
if [ ! $ZSHRC_LOADED ]; then
. ./.zshrc
fi
(defmacro foo-route []
`["/x" {:get 'foo-handler}])
(defroutes routes
[[["/"
;; I'm trying to do this, but it does NOT work
["/foo" (foo-route)]
;; this does work
["/bar" ["/" {:get bar-handler}]]]]])
### chain modals ###
$genericModal.show({
tmplName: 'some-list-of-actions-that-uses-the-current-controller-scope.html'
scope: $scope
close: 'Reject Button Text'
confirm: 'Resolve Button Text'
# to show another modal on confirmation, pass a 'resolve' option with another `show` function
resolve: ->
# to simply close the modal after dismisal , don't provide resolve / reject functions
<!-- radio field with custom select option -->
<div class="form-group">
<label class="control-label"></label>
<!-- normal radio -->
<div class="radio">
<label>
<input id="6-consumer-employee-patient" name="question-6" type="radio" value="Consumer/employee/patient" />
<i class="toggle-radio"></i>
Consumer/employee/patient
# fonts
brew tap caskroom/fonts
fonts=(
font-m-plus
font-clear-sans
font-roboto
font-sauce-code-powerline
font-fontawesome
)
getFileIconClass: function() {
var fileType = _.last(this.file_name.split('.')).toLowerCase(),
iconClass = null;
switch (fileType) {
case 'mp4':
case 'mov':
case 'avi':
case 'mpeg':
case 'qt':
# init db cleaner before each test
config.before(:each) do
DatabaseCleaner.start
end
# execute db cleaning after each test
config.after(:each) do
DatabaseCleaner.clean
end
"powerline
set guifont=Source\ Code\ Pro\ for\ Powerline:h13
" Plug check and auto install
let iCanHazVimPlug=1
let VimplugReadme=expand('~/.vim/autoload/plug.vim')
if !filereadable(VimplugReadme)
echo "Installing VimPlug.."
echo ""
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
DbxUiEngine.configure do |c|
c.api_url = "//#{Capybara.current_session.server.host}:#{Capybara.current_session.server.port}"
c.ui_spa_base = '/dbx-ui/'
c.asset_host = "//#{Capybara.current_session.server.host}:#{Capybara.current_session.server.port}"
end