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
| searchkick callbacks: :async, | |
| word_start: [:name, :customer_name, :studio_name], | |
| merge_mappings: true, | |
| settings: { | |
| analysis: { | |
| analyzer: { | |
| custom_chars: { | |
| type: 'custom', | |
| tokenizer: 'whitespace', | |
| filter: ['lowercase', 'custom_filter'] |
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 defined?(Pry || PryDebugger) | |
| Pry.commands.alias_command 'c', 'continue' | |
| Pry.commands.alias_command 's', 'step' | |
| Pry.commands.alias_command 'n', 'next' | |
| Pry.commands.alias_command 'f', 'finish' | |
| 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
| package main | |
| import ( | |
| "fmt" | |
| "html/template" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "log" | |
| "net/http" | |
| "os" |
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/bash | |
| # Remove exited containers | |
| for exited in $(docker ps -a | grep Exited | cut -d ' ' -f 1); do | |
| docker rm $exited; | |
| done | |
| # Remove intermediate images | |
| for img in $(docker images | grep "<none>" | awk "{print \$3}"); do | |
| docker rmi -f $img; |
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
| Warning: require(/var/www/public/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/public/index.php on line 24 | |
| Fatal error: require(): Failed opening required '/var/www/public/../vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/public/index.php on line 24 |
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_module /usr/local/opt/passenger/libexec/modules/ngx_http_passenger_module.so; | |
| #user nobody; | |
| worker_processes 2; | |
| # worker_rlimit_nofile 30000; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; |
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
| def resize_nocrop_noscale(image, w,h) | |
| w_original = image[:width].to_f | |
| h_original = image[:height].to_f | |
| if w_original < w && h_original < h | |
| return image | |
| end | |
| # resize | |
| image.resize("#{w}x#{h}") |
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
| # Bulk merge a bunch of records | |
| # | |
| # we expect most of the records to import to represent updates | |
| # so this method tries to be efficent with database queries | |
| # by using a single query to find any existing records matching the key_attributes | |
| # updating those records and finally inserting each remaining record | |
| # | |
| # It DOEST NOT use a transaction or lock. callers responsibilty to | |
| # add that if desired | |
| # |
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 ListingsController < ApplicationController | |
| def index | |
| movie_listing_service = ServiceLocator.get_service_instance(:MovieListing) | |
| @available_movies = movie_listing_service.available_movies | |
| render nothing: true #this is just an example don't get hung up on it :) | |
| end |