I hereby claim:
- I am zapo on github.
- I am zapo (https://keybase.io/zapo) on keybase.
- I have a public key ASCgQBKsRiEbgt4eVyNEcWM3z0k8f945UREIgtxBH4reyQo
To claim this, I am signing this object:
class TimeZoneModel | |
class ZoneProxy | |
attr_reader :target | |
def initialize target | |
@target = target | |
end | |
def name | |
@target.tzinfo.identifier |
module Concerns | |
module Dupable | |
def duplicate | |
# copy self with attributes only, includes belongs_to associations | |
duplicate = self.dup | |
# copy all has_many associations... | |
# reject through target associations, we only want to duplicate the association models | |
self.class.reflect_on_all_associations(:has_many).select { |a| a.through_reflection.nil? }.each do |assoc| |
# plagiarism of https://github.com/runemadsen/cancan-backbone/blob/master/cancan-backbone.js | |
# without backbone dependency | |
class exports.Rule | |
constructor: (rule) -> | |
@actions = rule.actions | |
@conditions = rule.conditions ? {} | |
@subjects = rule.subjects | |
@can = !!rule.can |
module Helpers | |
module Validations | |
private | |
def assert_valid_url url | |
assert_match URI::regexp(%w(http https)), url, "\"#{url}\" isn't a valid URL" | |
end | |
def assert_validated_presence object, attribute, success_val = "not blank", expected_msg = :blank | |
assert_validated object, attribute, |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'ostruct' | |
require 'yaml' | |
require 'active_support' | |
require 'active_support/core_ext' | |
require 'podio' | |
def usage | |
STDOUT.puts " Usage: #{ENV['TODO_SH']} podio <option>" |
I, Antoine Niek, have read and do accept the MuleSoft Contributor Agreement | |
at http://www.mulesoft.org/legal/contributor-agreement.html | |
Accepted on Thu Jun 25 2015 09:53:58 GMT-0400 (EDT) |
#!/usr/bin/env bash | |
## -*- sh-basic-offset: 2 -*- | |
set -o errexit -o nounset -o pipefail | |
BASENAME=$(basename "$0") | |
BASEURL="https://api.travis-ci.com" | |
eval "$(docopts -A args -V - -h - : "$@" <<EOF | |
Usage: |
I hereby claim:
To claim this, I am signing this object:
const connection = new RTCPeerConnection({ iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }); | |
connection.onicecandidate = (e) => { | |
if (e.candidate) { | |
localStorage.setItem('candidate', JSON.stringify(e.candidate)); | |
} | |
}; | |
connection.oniceconnectionstatechange = (e) => { | |
console.log(connection.iceConnectionState); |
The standard names for indexes in PostgreSQL are:
{tablename}_{columnname(s)}_{suffix}
where the suffix is one of the following:
pkey
for a Primary Key constraint;key
for a Unique constraint;excl
for an Exclusion constraint;idx
for any other kind of index;