Skip to content

Instantly share code, notes, and snippets.

@BeattieM
BeattieM / access_token_generation.rb
Last active May 26, 2016 10:11
Rails Doorkeeper AuthToken Manual Creation
@access_token = Doorkeeper::AccessToken.create(
application_id: application.id,
resource_owner_id: current_resource_owner.id,
use_refresh_token: Doorkeeper.configuration.refresh_token_enabled?,
expires_in: Doorkeeper.configuration.access_token_expires_in
)
@BeattieM
BeattieM / API Contract Example Spec.md
Last active October 27, 2024 13:14
An example of an API contract between the server and front-end devices

#Users

  • User object
{
  id: integer
  username: string
  email: string
  created_at: datetime(iso 8601)
  updated_at: datetime(iso 8601)
}
@BeattieM
BeattieM / core-site.xml
Last active October 28, 2022 06:33
Running Spark jobs on a remote YARN cluster
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://u1401.ambari.apache.org:8020</value>
</property>
</configuration>
[ AGENT ] 2018-06-21 17:54:47 UTC | ERROR | (processor.go:58 in run) | unable to encode msg invalid UTF-8 string: [ AGENT ] 2018-06-21 17:54:46 UTC | ERROR | (processor.go:58 in run) | unable to encode msg invalid UTF-8 string: d\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\ufffd\\ufffd\\ufffd\":1,\"Z\\ufffd}ƃf\\ufffd\\\"\\ufffd\\
tracer.Start(tracer.WithAgentAddr(logger.DDAgentAddr()),tracer.WithSampler(tracer.NewRateSampler(0.01)))
defer tracer.Stop()
func FilterCardsHandler(w http.ResponseWriter, r *http.Request) {
span := tracer.StartSpanFromContext(r, "FilterCardsHandler")
defer span.Finish()
}
func CardBuilder(span ddtrace.Span) {