Skip to content

Instantly share code, notes, and snippets.

View kevinchugh's full-sized avatar

Kevin Chugh, Ph.D, Founder, Main Street Computing (mainstreetcomputing.com) kevinchugh

View GitHub Profile
@media (max-width:992px) and (min-width:500px) {
7562
- .btn-circle.btn-xl{
7563
- width: 110px;
7564
- height: 110px;
7565
- border-radius:50%;
7566
I, [2015-12-11T11:19:52.019010 #15595] INFO -- : Started POST "/user_api/submit_flaunt" for 70.50.241.217 at 2015-12-11 11:19:52 -0500
I, [2015-12-11T11:19:52.045754 #15595] INFO -- : Processing by UserApiController#submit_flaunt as JSON
I, [2015-12-11T11:19:52.046097 #15595] INFO -- : Parameters: {"image"=>#<ActionDispatch::Http::UploadedFile:0x007f091941df10 @tempfile=#<Tempfile:/tmp/RackMultipart20151211-15595-xlit56>, @original_filename="user_profile_image.jpg", @content_type="application/octet-stream", @headers="Content-Disposition: form-data; name=\"image\"; filename=\"user_profile_image.jpg\"\r\nContent-Type: application/octet-stream\r\n">, "copyright_agreed_to"=>"true", "content"=>"test", "token"=>"fb9fc8a5e8fb1dcb893fa8b8d12a7d2e", "latitude"=>"55.7558", "offer_id"=>"42", "company"=>"", "longitude"=>"37.6176"}
E, [2015-12-11T11:19:52.397925 #15595] ERROR -- : Entered Begin
I, [2015-12-11T11:19:53.282834 #15595] INFO -- : [AWS S3 200 0.373922 0 retries] create_bucket(:bucket_name=>"flaunt-stagin
// IOS set up the login screen
-(void) dwollaConnect {
NSArray *scopes = @[@"send", @"balance", @"accountinfofull", @"contacts", @"funding", @"request", @"transactions"];
_client = [[DwollaOAuth2Client alloc] initWithFrame:CGRectMake(0, 0, 320, 460) key:k_DWOLLA_KEY secret:k_DWOLLA_SECRET redirect:k_DWOLLA_REDIRECT_URL response:@"code" scopes:scopes view:self.view reciever:self];
[_client login];
}
# this is the ruby / rails code that receives the dwolla callback
def goto
begin
question = Question.find params[:question][:question_number] # find will throw an exception if not found
redirect_to question # redirecting to an object will take you to the show page for that object
rescue
flash[:notice] = "sorry, error"
redirect_to :index
end
Id: 11173422
Rcvr: 1
HasSig: true
Sig: 46
Icao: AA7E2E
Bad: false
Reg: N77510
FSeen: "/Date(1478109264402)/"
TSecs: 1582
CMsgs: 592
<html><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link href="http://bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
<style>
table, table td {table-layout:fixed;word-wrap:break-word;}
.invoice-title h2, .invoice-title h3
{
display: inline-block;
<div id = "fields">
<input type="hidden" value="58dd33e8d036690d0ae9a670" name="child_cases[case_type_id]" id="child_cases_case_type_id" />
<input value="58dd3a8cd036690d0ae9aa08" type="hidden" name="child_cases[parent_case]" id="child_cases_parent_case" />
<input type="hidden" value="58dd33e8d036690d0ae9a671" name="child_cases[case_type_field_set_data_sets_attributes][0][case_type_field_set_id]" id="child_cases_case_type_field_set_data_sets_attributes_0_case_type_field_set_id" />
<div class="panel panel-default">
<div class="panel-heading">
<h4> ref </h4>
</div>
<div class="panel-body">
# in organization.rb:
def self_and_descendants
# simply return them in the order they should appear in the tree
answer = []
answer << self
answer += Organization.where(parent_organization_id: self.id).
sort_by{|x| x.description}.self_and_descendants # may have to use authorized instead of .all
end
@kevinchugh
kevinchugh / gist:13f8187d24551daf719d90dc728c368c
Created August 18, 2017 14:45
prefix and post fix debatcher
// prefix
@Override
public void onSubscriptionData(BotContext ctx, RtmSubscriptionData messages)
{
JsonArray msgJsonArray = messages.getMessages();
JsonArray msgs = msgJsonArray.get(0).getAsJsonArray();
for (JsonElement msg : msgs)
Kevins-Macbook-Air:opencaseware kevin$ gem install bundler
ERROR: SSL verification error at depth 2: certificate has expired (10)
ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z
ERROR: SSL verification error at depth 2: certificate has expired (10)
ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z
ERROR: SSL verification error at depth 2: certificate has expired (10)
ERROR: Certificate /C=BE/O=GlobalSign nv-sa/OU=Root CA/CN=GlobalSign Root CA expired at 2014-01-28T12:00:00Z
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)
ERROR: SSL verification error at depth 2: certificate has expired (10)