I hereby claim:
- I am zmajstor on github.
- I am zmajstor (https://keybase.io/zmajstor) on keybase.
- I have a public key whose fingerprint is 051D F53E 7747 101E 4A93 6AD8 C8CD 3A5E 8BFD BF3D
To claim this, I am signing this object:
get 'users_autocomplete', to: 'users#autocomplete' |
# input parameters (from LDAP or device attributes SERIAL, UDID) ... | |
param1 = "abcdefgh12345678" | |
param2 = "qwertyui09876543" | |
param3 = "asdfghjkl@zxcvbnml" | |
# take first 5 non-whitespace character | |
regex1 = /^\S{5}/ | |
# take last 4 non-whitespace character | |
regex2 = /\S{4}$/ |
Device.find_by_sql "select udid, count(*) from devices group by udid having count(*) > 1" |
I hereby claim:
To claim this, I am signing this object:
class Payload | |
def general_payload | |
payload = Hash.new | |
payload['PayloadVersion'] = 1 | |
payload['PayloadUUID'] = rand(10) | |
payload['PayloadOrganization'] = organization | |
payload | |
end | |
end |
<!-- Load Feather code --> | |
<!-- <script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script> --> | |
<script type="text/javascript" src="https://dme0ih8comzn4.cloudfront.net/js/feather.js"></script> | |
<!-- Instantiate Feather --> | |
<script type='text/javascript'> | |
var featherEditor = new Aviary.Feather({ | |
apiKey: 'API_KEY', | |
// apiKey: '<%= ENV['AVIARY_KEY'] %>', | |
apiVersion: 3, |
# builder pattern in ruby | |
# inspired by https://github.com/tboyko/ios_config | |
# and http://blog.rubygeek.com/2009/11/24/builder-pattern-in-ruby/ | |
module Payload | |
# provide base for building Payloads in Configuration Profile | |
class Base | |
def build | |
raise ArgumentError, "missing identifier" unless identifier | |
-----BEGIN CERTIFICATE----- | |
MIIExDCCA6ygAwIBAgITUgAACqTdV8IeZ2qIFgAAAAAKpDANBgkqhkiG9w0BAQUF | |
ADBJMRMwEQYKCZImiZPyLGQBGRYDbmV0MRYwFAYKCZImiZPyLGQBGRYGcHJvbWRt | |
MRowGAYDVQQDExFQcm9tZG1ORVRSb290Q0F2MTAeFw0xNDA4MTUxODIwNDBaFw0x | |
NTA4MTUxODIwNDBaMB0xGzAZBgNVBAMMElpvcmFuIE1hanN0b3JvdmnEhzCCASIw | |
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM2z4QYHjTHNbSkl4UFF1E1X5zgG | |
TdVX5b6gpYjwlTpBNbFDNwAIePjJHZ/IMwpFpJzHU/G9chGx67D+RsfCkd1LHdnR | |
P0WOLKXsCImZIneAfvMt8gXDdeHzcXtNapgoIfjnAAZs4UN9Lxvd4KN2UpsSYKu+ | |
jhRrmDE3vtedMLK7l1pnKSK6HCjch6zdnF9JytsdApGjcwKm4ubr/0y17XQvcrzl | |
21C0NRE77am/nR/3Jd3/qZjA7OT99KCjTx3OYXqZvU0s/4IEEBIyAWWFkxFQHlsE |
module BootstrapHelper | |
# Bootstrap 3 helpers for Rails 4 Flash messages | |
# in Gemfile add line: gem 'bootstrap-sass', '~> 3.2.0' | |
# and <%= flash_messages %> in views/layouts/application.html.erb | |
# use in controllers: flash[:error] = 'Invalid email/password combination' | |
def bootstrap_class_for flash_type | |
{ success: "alert-success", error: "alert-danger", alert: "alert-warning", notice: "alert-info" }[flash_type] || flash_type.to_s | |
end |
require 'OpenSSL' | |
class KeyPair | |
attr_reader :key, :cert | |
def initialize serial, issuer=nil | |
@key = OpenSSL::PKey::RSA.new(1024) | |
@cert = OpenSSL::X509::Certificate.new | |
@cert.version = 2 # RFC 5280 - v3 | |
@cert.serial = serial |