I hereby claim:
- I am jphenow on github.
- I am jphenow (https://keybase.io/jphenow) on keybase.
- I have a public key ASDK6Z0QVCc08S2Lyl-7s7wfn3B7v7HAfNlaV9eiH7HiyQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#! /usr/bin/python | |
""" | |
Description: Will run an lpstat -p and send an email to jtrutwin notifying him of a disabled printer, if there is one, so that he can take action. | |
TODO: | |
1) Add parameter to override the recipient of the email | |
2) Add functionality for only sending email when a printer hasn't been found to be disabled today - ie. email sent at 5am shouldn't be sent again if only that same printer is disabled as of 8am, should only send another email if another printer has been disabled or if the original printer has been disabled, enabled and re-disabled. | |
""" | |
import commands |
#!/usr/bin/env bash | |
set -e | |
# Set to your project name | |
project="Highrise.VisualStudio.Plugin" | |
assetPath="$project/bin/Release/net461" | |
targetReleaseDir="./release" | |
# Find mpack asset from bin dir and make sure it's the latest one |
#!/usr/bin/env ruby | |
# Go to emoji customization page on your Slack org | |
# download the html for that page | |
# Also need "nokogiri" installed | |
# | |
# Usage: scrape <htmlfile> | |
require 'nokogiri' | |
require 'open-uri' | |
file = ARGV[0] |
################## | |
# Mongoid # | |
################## | |
League.org_id(1) | |
#=> #<Mongoid::Criteria | |
# selector: {:org=>{"$in"=>[1]}}, | |
# options: {}, | |
# class: League, | |
# embedded: false> |
# ... | |
dependencies: | |
override: | |
# Delete these two lines | |
- sudo service postgresql stop 9.4 | |
- sudo cp -v /etc/postgresql/9.{4,5}/main/pg_hba.conf && sudo service postgresql restart 9.5 | |
# ... | |
database: | |
override: | |
# Delete lines like these below. Yours won't be the same, but we had to do something |
# ... | |
gta() { | |
base=$(echo $PWD | sed "s|$GOPATH/src/||") | |
go test $(go list ./... | grep -v vendor | sed "s|$base/|./|") | |
} |
# remap prefix to Control + a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# quick pane cycling |
require File.expand_path("../config/environment", __FILE__) | |
require 'rspec' | |
# Disable for all serializers (except ArraySerializer) | |
ActiveModel::Serializer.root = false | |
# | |
# # Disable for ArraySerializer | |
ActiveModel::ArraySerializer.root = false | |
class AMSEnvelope |
# Tried on Rails 3.2.{11,12} so far | |
class Venue < ActiveRecord::Base | |
scope :org_id, ->(ids) { where org_id: Array(ids) } | |
end | |
Venue.org_id(1).org_id(2) | |
# => Venue Load (0.3ms) SELECT `venues`.* FROM `venues` WHERE `venues`.`org_id` IN (2) | |
Venue.where(org_id: [1]).where(org_id: [2]) | |
# => Venue Load (0.5ms) SELECT `venues`.* FROM `venues` WHERE `venues`.`org_id` IN (1) AND `venues`.`org_id` IN (2) |