Skip to content

Instantly share code, notes, and snippets.

type City {
id: ID!
name: String!
country: String!
locations: [Location]
}
type Location {
id: ID!
cityId: ID!
@adamarthurryan
adamarthurryan / App.kt
Created August 9, 2017 19:18 — forked from tinmegali/App.kt
Injecting ViewModel with Dagger2 on Android using Kotlin
class App : Application(), HasActivityInjector {
@Inject lateinit var activityInjector: DispatchingAndroidInjector<Activity>
override fun activityInjector(): AndroidInjector<Activity> {
return activityInjector
}
override fun onCreate() {
super.onCreate()
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if

Batch recombining audio

ffmpeg

Per this SuperUser thread, the command for recombining an audio track with an mp4 video already containing audio is as follows:

ffmpeg -i 2-2.mp4 -i 2.2.wav -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 render-2.2.mp4

Breaking it down:

@adamarthurryan
adamarthurryan / tutsplus-introduction-outline-coffeebreak.md
Created January 29, 2016 20:30
Envato Tuts+ Code: Introduction Outline for Coffee Break Course

Introduction Outline

The Strategies for a Great Introduction section of the instructor guide has some general guidelines: https://instructors.tutsplus.com/guide/course/introductions.php

We're now asking that every course has an introduction that uses these best practices.

With respect to visual engagement, we're asking specifically that

  • the lesson not start with a view of the Tuts+ desktop or a title card
  • the lesson incorporate previews of coding and/or the course project
@adamarthurryan
adamarthurryan / tutsplus-code-coffeebreak-instruction-standards.md
Last active January 5, 2016 19:35
Envato Tuts+ Code: Coffee Break Instruction Standards

Coffee Break Instruction Standards

All Envato Tuts+ courses are expected to meet certain standards for quality and instruction:

In addition, there are some standards that are specific to the Code section. These guidelines were drawn from the best practices of the many talented Tuts+ Code instructors!

@adamarthurryan
adamarthurryan / tutsplus-introduction-outline.md
Last active February 11, 2016 20:09
Envato Tuts+ Code: Introduction Outline

Introduction Outline

The Strategies for a Great Introduction section of the instructor guide has some general guidelines: https://instructors.tutsplus.com/guide/course/introductions.php

We're now asking that every course has an introduction that uses these best practices.

With respect to visual engagement, we're asking specifically that

  • the lesson not start with a view of the Tuts+ desktop or a title card
  • the lesson incorporate previews of coding and/or the course project
@adamarthurryan
adamarthurryan / course review.md
Last active November 22, 2015 23:04
Course Review Checklist

Course Review Checklist

  • instructor:
  • course title:
  • course notes:

For more detail about these standards, see Instruction Standards. These represent the best practices of many talented Tuts+ Code instructors!)

@adamarthurryan
adamarthurryan / tutsplus-code-instruction-standards.md
Created November 21, 2015 19:48
Envato Tuts+ Code: Instruction Standards
@adamarthurryan
adamarthurryan / justin-beiber.json
Created June 12, 2015 20:42
Sample JSON data for the Tuts+ course 30 Days to Learn JQuery.
{"statuses":[{"metadata":{"iso_language_code":"en","result_type":"recent"},"created_at":"Fri Jun 12 20:32:55 +0000 2015","id":609458378071494656,"id_str":"609458378071494656","text":"RT @Obonjo: Did Rap music do this to you? Did Emiinem, Justin Timberlake and Jusrtin Beiber do this to you. #askrachel","source":"\u003ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003eTwitter for iPhone\u003c\/a\u003e","truncated":false,"in_reply_to_status_id":null,"in_reply_to_status_id_str":null,"in_reply_to_user_id":null,"in_reply_to_user_id_str":null,"in_reply_to_screen_name":null,"user":{"id":373965187,"id_str":"373965187","name":"fenny","screen_name":"heelssopretty","location":"Strawberry Fields","description":"Fun loving,free spirited bird.","url":null,"entities":{"description":{"urls":[]}},"protected":false,"followers_count":87,"friends_count":175,"listed_count":0,"created_at":"Thu Sep 15 13:40:21 +0000 2011","favourites_count":14,"utc_offset":null,"time_zone":null,"geo_enabled":false,"verified":f