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/sh | |
| # | |
| # nginx - this script starts and stops the nginx daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
| # proxy and IMAP/POP3 proxy server | |
| # processname: nginx | |
| # config: /etc/nginx/nginx.conf | |
| # config: /etc/sysconfig/nginx |
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
| module ActionDispatch | |
| module Routing | |
| class Mapper | |
| def include_routes(file) | |
| file = File.new("#{Rails.root}/config/routes/#{file}.rb", "r") | |
| buffer = "" | |
| while (line = file.gets) | |
| buffer += line | |
| end | |
| file.close |
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
| // | |
| // PrettyTableViewCell+StaticCells.h | |
| // | |
| // | |
| // Created by Justin McNally on 3/3/13. | |
| // Copyright (c) 2013 Kohactive. All rights reserved. | |
| // | |
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
| #load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
| ################################## | |
| # Edit these | |
| set :application, "APPLICATION_OR_SITE_NAME" | |
| set :host, "SERVER_ADDRESS" | |
| set :repository, "YOUR_GIT_REPO" | |
| set :branch, "master" | |
| set :deploy_to, "PATH_ON_SERVER_TO_DEPLOY_TO" |
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
| alias :create, :do_save | |
| alias :update, :do_save | |
| def do_save | |
| @model = Model.find_or_initialize_by_id(params[:id]) | |
| if @model.persisted? |
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
| index index.php index.html index.htm; | |
| # enforce www (exclude certain subdomains) | |
| #if ($host !~* ^(www|subdomain)) | |
| #{ | |
| # rewrite ^/(.*)$ $scheme://www.$host/$1 permanent; | |
| #} | |
| # enforce NO www | |
| #if ($host ~* ^www\.(.*)) |
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
| #salesforce automation via rake using the DataBaseDotCom gem | |
| namespace :salesforce do | |
| desc "add salesforce ids to products" | |
| task :match_products => :environment do | |
| client = Databasedotcom::Client.new :host => SFDC_DOMAIN, :client_id => SFDC_APP_ID, :client_secret => SFDC_APP_SECRET | |
| client.authenticate :username => SFDC_EMAIL, :password => SFDC_PASSWORD_AND_TOKEN | |
| #materialize Sobject | |
| client.sobject_module = SFDC::Objects | |
| cl = client.materialize("Product2") |
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
| module Middleman | |
| module Emblem | |
| class << self | |
| def registered(app, options={}) | |
| require "barber-emblem" | |
| require "middleman-emblem/sprockets-template" |
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/sh | |
| # | |
| # An example hook script to verify what is about to be committed. | |
| # Called by "git commit". The hook should | |
| # exit with non-zero status after issuing an appropriate message if | |
| # it wants to stop the commit. | |
| # | |
| # To enable this hook, rename this file to "pre-commit". | |
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
| contentArrayContains: function(id, type) { | |
| var contains = null; | |
| Ember.get(type, 'collection').forEach(function(item) { | |
| if (item.get('id') === id) { | |
| contains = item; | |
| } | |
| }); | |
| return contains; |