Skip to content

Instantly share code, notes, and snippets.

View danielvlopes's full-sized avatar

Daniel Lopes danielvlopes

View GitHub Profile
Uri uri = new Uri.Builder()
.scheme("https")
.authority("ifttt.com")
.appendPath("SERVICE_NAME")
.appendQuery("embed")
.build();
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
activity.startActivity(intent);
@import Foundation;
@import SafariServices;
NSString *serviceName = @"example";
// Redirect URI matching configuration in info.plist
// This is only required when linking to individual Applet Page instead of the Applets Index
NSURLQueryItem *redirectURIQueryItem = [NSURLQueryItem queryItemWithName:@"redirect_uri" value:@"yourapp://auth.ifttt.com"];
// Construct URL for applets index path
import UIKit
import SafariServices
let serviceName = "example"
// Redirect URI matching configuration in info.plist
// This is only required when linking to individual Applet Page instead of the Applets Index
let redirectURIQueryItem = NSURLQueryItem(name: "redirect_uri", value: "yourapp://auth.ifttt.com")
// Construct URL for applets index path
(byebug) self.method :get
#<Method: RSpec::ExampleGroups::EmbeddedWebConstraints(RSpec::Rails::Matchers::RoutingMatchers::RouteHelpers)#get>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-type' content='text/html; charset=utf-8'>
</head>
<body>
<script src="../../build/react.js"></script>
<script src="../../build/JSXTransformer.js"></script>
<script type="text/jsx">
React.render(

Because it is heavily inspired by Rails, bringing the same problems but taking it to a whole new level which kinda kills most of benefits of Rails.

You still have a tons of code under the hood and lots of opinions (like Rails) but with a bunch of over-engineered stuff on top (unlike Rails). When working with Rails, the amount of code/patterns I need to learn is a trade-off I'm willing to take because there's a bunch of patterns that you pretty much don't need much more flexibility than it offers already (controllers/routes/views-helpers for example), ActiveRecord on the other end, sometimes is a pain in the ass. Rails is already border-line too much shit to just receive a request and concatenate a response but it's "ok" since it's fullstack (connecting to a database, serializing objects, adding headers, localization and etc is still something not so trivial).

Rails was born questioning the massive complexity of Java frameworks for webdev. And I still think Rails does too much stuff (like what's wrong with

module Notifiable
extend ActiveSupport::Concern
# def notification_mailer_class
# Implement this method
# end
def notified?
!notified_at.nil?
end
$ gem install rubocop -wn `rbenv prefix`/bin
$ rbenv rehash
@danielvlopes
danielvlopes / gist:5c15cf45f2f539450a79
Created May 18, 2015 23:28
cutting-the-bs-with-new-clients
Where did you hear about us?
We advocate active communication. Are you able to be online daily or meet at least once a week?
If you have a current version, what's the URL?
What's the inovation of your product or service? What's new about what you're doing?
Are there any constraints that we will have to work with on this project?
Do you have an extrict launch date?
We prefer to work in an iterative fashion, billing for weekly units of time on NET15 terms instead of closed scope/price projects. Would you be ok with that?
What is your budget?
- $ 15,000.00 - $ 30,000.00
module ApplicationHelper
def calendar(date = Date.today)
d1 = date.beginning_of_month
d2 = date.end_of_month
month = []
current = d1.beginning_of_week(:sunday)
while current <= d2