Install the Rails gem if you haven't done so before
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
| {% comment %} | |
| Source: https://gist.github.com/carolineschnapp/9122054 | |
| If you are not on a collection page, do define which collection to use in the order form. | |
| Use the following assign statement, replace 'your-collection-handle-here' with your collection handle. | |
| {% assign collection = collections.your-collection-handle-here %} | |
| Use the assign statement outside of this comment block at the top of your template. | |
| {% endcomment %} | |
| {% paginate collection.products by 100 %} |
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 NOKOGIRI 1.5.X OR LOWER | |
| gem uninstall nokogiri libxml-ruby | |
| brew update | |
| brew uninstall libxml2 | |
| brew install libxml2 --with-xml2-config | |
| brew install libxslt | |
| bundle config --global build.nokogiri "--with-xml2-include=/usr/local/Cellar/libxml2/2.9.1/include/libxml2" | |
| bundle |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output
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
| # with my git configuration the spree repo was giving me issues with line endings | |
| # this fixed the issue for me: marking a file as binary causes git to ignore it completely | |
| core/vendor/assets/javascripts/jquery.alerts/jquery.alerts.css.erb binary | |
| core/vendor/assets/javascripts/jquery.alerts/jquery.alerts.js binary | |
| core/vendor/assets/javascripts/jquery.jstree/themes/apple/style.css binary | |
| sample/db/sample/spree/line_items.yml binary | |
| sample/db/sample/spree/products.yml binary |
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 should be in ebextensions | |
| container_commands: | |
| 01setup_cors: | |
| command: "ruby .ebextensions/cors.rb" | |
| 02reload_nginx: | |
| command: "service nginx reload" |
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
| #!/bin/bash | |
| sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
| sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
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
| <%= form_for(@contact) do |f| %> | |
| <% if @contact.errors.any? %> | |
| <div id="error_explanation"> | |
| <h3><%= pluralize(@contact.errors.count, "error") %> prohibited this contact from being saved:</h2> | |
| <ul> | |
| <% @contact.errors.full_messages.each do |msg| %> | |
| <li><%= msg %></li> | |
| <% end %> | |
| </ul> |
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 the server has ffmpeg: | |
| ## For the server: | |
| ffmpeg -f fbdev -i /dev/fb0 -f avi pipe:1 | nc -l -p 1234 | |
| ## For the viewer: | |
| nc 127.0.0.1 1234 | ffplay -i pipe:0 | |
| # If the server doesn't have ffmpeg: | |
| ## For the server: | |
| sudo cat /dev/fb0 | nc -l -p 1234 | |
| ## For the viewer (replace 1920x1080 with the server's resolution): |
NewerOlder
