Model.where("table_column LIKE :prefix", prefix: "#{keyword}%")
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
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| class Cors | |
| { | |
| public function handle($request, Closure $next) | |
| { |
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 | |
| killall Xcode | |
| xcrun -k | |
| xcodebuild -alltargets clean | |
| rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache" | |
| rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" | |
| rm -rf ~/Library/Developer/Xcode/DerivedData/* | |
| rm -rf ~/Library/Caches/com.apple.dt.Xcode/* | |
| open /Applications/Xcode.app |
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
| #!/usr/bin/env zsh | |
| # tmux cluster ssh + knife support | |
| # Daniel Kertesz <[email protected]> | |
| # | |
| # Add basic hosts completion to zsh by running: | |
| # compdef _hosts tmux-cssh | |
| set -e | |
| autoload colors; colors |
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
| Array values in the parameter to `Gem.paths=` are deprecated. | |
| Please use a String or nil. | |
| An Array (...) was passed in from bin/rails:3:in `load' | |
| Solution | |
| ======== | |
| https://github.com/rubygems/rubygems/issues/1551 | |
| If you came to this issue by googling the error specified in the description of this issue, you should know that it has already been fixed in spring-1.6.4 and all you need to do is to update to latest spring and regenerate binstubs, like this: |
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
| container_commands: | |
| 01_fix_static_cors: | |
| command: "/tmp/fix_static_cors.sh" | |
| files: | |
| "/tmp/fix_static_cors.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root | |
| content: | | |
| #!/bin/bash |
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
| config.omniauth :wordpress_hosted, ENV['SSO_KEY'], ENV['SSO_SECRET'], | |
| strategy_class: OmniAuth::Strategies::WordpressHosted, | |
| client_options: { site: ENV['SSO_URL'] } |
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
| # Elixir has lazily evaluated enumerable objects that allow you | |
| # to work with enumerable objects like lists either only as needed | |
| # or infinitely. | |
| # Start up iex to play around | |
| $ iex | |
| # Typical enumeration is done eagerly where the result is computed ASAP | |
| iex> Enum.map(1..10, fn i -> i * 2 end) | |
| [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] |
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
| brew tap homebrew/versions | |
| brew install v8-315 | |
| gem install libv8 -v '3.16.14.13' -- --with-system-v8 | |
| gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315 | |
| bundle install |
First create a .powenv file and add:
export RUBY_DEBUG_PORT=1234
export POW_WORKERS=1
Add the following gems to your Gemfile:
gem 'ruby-debug-ide'