This file contains 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 | |
# | |
# Delete Python's compiled *.pyc and __pycache__ files like a pro | |
# https://gist.github.com/jakubroztocil/7892597 | |
# | |
# Usage: | |
# Delele *.pyc and __pycache__ files recursively in the current directory: | |
# $ pyc | |
# | |
# The same, but under /path: |
This file contains 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 'rubygems' | |
require 'ffi-rzmq' | |
context = ZMQ::Context.new | |
front_addr = "ipc:///tmp/dispatch-front.ipc" | |
back_addr = "ipc:///tmp/dispatch-back.ipc" | |
frontend = context.socket(ZMQ::XREP) | |
frontend.bind(front_addr) |
This file contains 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 inventory_updated(splrid, updates) | |
self.update_attributes(updates) | |
#Error because WineScore.wine(self) is returning an array instead of object. Check mongo..there are multiple of objects for some these wine scores | |
WineScore.wine(self).supplier(splrid).each {|ws| ws.update_attributes({:inS => (self.total_stock > 0)}) } | |
end |