Skip to content

Instantly share code, notes, and snippets.

Ken Iovino iovino

Block or report user

Report or block iovino

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@iovino
iovino / gist:6299293
Created Aug 21, 2013
This query will return true if the selected usergroup is marked as the banned group:
View gist:6299293
SELECT IF(usergroup.genericoptions & 32, 0, 1) AS is_banned_group
FROM usergroup as usergroup
WHERE usergroup.usergroupid = 8;
View mobile.scss
@media only screen and (max-device-width: 540px), only screen and (min-device-width: 560px) and (max-device-width: 1136px) and (-webkit-min-device-pixel-ratio: 2) {
body {
min-width: 320px !important;
max-width: 320px !important;
overflow: hidden;
}
.full-width{width:320px !important;}
#main-outlet {
padding-top: 95px !important;
}
@iovino
iovino / google_dfp_order_service.rb
Last active Dec 14, 2015
Returns all approved orders from a Google DFP account via their API using their Ruby gem 'google-dfp-api'.
View google_dfp_order_service.rb
require 'dfp_api'
dfp = DfpApi::Api.new
order_service = dfp.service(:OrderService, :v201211)
order_results = order_service.get_orders_by_statement({
:query => 'WHERE status = :order_status LIMIT 500',
:values => [
{:key => 'order_status',
:value => {:value => 'APPROVED', :xsi_type => 'TextValue'}}
]
@iovino
iovino / gist:1435830
Created Dec 5, 2011
Checks to see if a user is banned or not
View gist:1435830
SELECT user.username,
IF(usergroup.genericoptions & 32, 0, 1) AS is_banned
FROM user as user
INNER
JOIN usergroup AS usergroup
ON usergroup.usergroupid = user.usergroupid
WHERE userid = 1;
You can’t perform that action at this time.