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
| { | |
| "query": { | |
| "match": { | |
| "values.shortDescription": "automadic generater" | |
| } | |
| }, | |
| "filter": { | |
| "bool": { | |
| "must": [ | |
| { |
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
| bSubs := BSONCollection{} | |
| err := q(query).All(&bSubs) | |
| // bSubs is still a zero-value BSONCollection, not bsonCol |
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
| require 'fileutils' | |
| # Install the 'facter' gem if not already installed. Facter assists in automatically determining the RAM and CPUs | |
| # to use for the VM. | |
| facter_plugins = `vagrant plugin list | grep facter`.tr("\n","") | |
| unless facter_plugins.length > 0 | |
| puts "The 'facter' gem is not yet installed; installing..." | |
| system 'vagrant', 'plugin', 'install', 'facter' | |
| 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
| atom.commands.add 'atom-text-editor', 'custom:vim-mode-and-core-cancel', -> | |
| editor = atom.views.getView(atom.workspace.getActiveTextEditor()) | |
| atom.commands.dispatch(editor, 'vim-mode-plus:activate-normal-mode') | |
| atom.commands.dispatch(atom.views.getView(atom.workspace), 'core:cancel') |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!-- Produced by Beyond Compare 4 from Scooter Software --> | |
| <!-- | |
| This is an extension of the work done by Nate Finch: | |
| https://npf.io/2014/05/diffing-go-with-beyond-compare/ | |
| The regular expressions for identifiers have been updated | |
| to match on lowercase and allow numbers to be included anywhere | |
| after the first character of the word. | |
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 Admin::Product < ActiveRecord::Base | |
| require 'csv' | |
| has_attached_file :image, | |
| styles: { medium: "500x500>", | |
| thumb: "200x200>" }, | |
| default_url: "/images/:style/missing.jpg" | |
| validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/ |
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
| update logs | |
| set app_id = case when apps.id is not null then apps.id else 0 end | |
| from logs l | |
| left outer join apps | |
| on l.app_name = apps.name | |
| AND l.company_id = apps.company_id |
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
| Run options: include {:focus=>true} | |
| All examples were filtered out; ignoring {:focus=>true} | |
| ........*.........................F.....FFFFF................................FFFFFFF..FF........................................................................F.......................................... | |
| Pending: | |
| products admin user deleting product | |
| # Not yet implemented | |
| # ./spec/features/admin/products_spec.rb:40 |
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
| require 'uri' | |
| require 'open-uri' | |
| require 'fileutils' | |
| require 'httparty' | |
| # You will need to have HTTParty installed: | |
| # https://github.com/jnunemaker/httparty | |
| # | |
| # Initialize with your access token: | |
| # GroupMe.new('abcdefghijklmnopqrstuvwxyz') |
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 | |
| /* | |
| * Output a random fact to GroupMe via a bot. | |
| * | |
| * Trigger the bot with "!randomfact" or "!random fact". | |
| * Enter the bot ID on line 43. | |
| * | |
| */ |