This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shapeless._ | |
import shapeless.labelled.FieldType | |
import shapeless.record._ | |
trait GenericDiff[H <: HList] { | |
// syntactic sugar | |
type HI = H | |
// compares field values and returns the field name with values if they differ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Install MacOS Packages | |
hosts: localhost | |
become: false | |
vars: | |
brew_cask_packages: | |
- atom | |
- docker | |
- dropbox | |
- firefox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Re-encode source video with one keyframe every 5 frames | |
ffmpeg -i source.mkv -g 5 tmp.mkv | |
# Search black frames | |
ffmpeg -i tmp.mkv -vf blackframe -f null - | |
# Use output to locate black frames right on keyframes | |
# Then cut video at those keyframes | |
ffmpeg -i tmp.mkv -ss 6.089 -to 180.263 -c copy tmp2.mkv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import scala.reflect.runtime.universe._ | |
object ReflectionHelpers extends ReflectionHelpers | |
trait ReflectionHelpers { | |
protected val classLoaderMirror = runtimeMirror(getClass.getClassLoader) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##' Modifies 'data' by adding new values supplied in newDataFileName | |
##' | |
##' newDataFileName is expected to have columns | |
##' c(lookupVariable,lookupValue,newVariable,newValue,source) | |
##' | |
##' Within the column 'newVariable', replace values that | |
##' match 'lookupValue' within column 'lookupVariable' with the value | |
##' newValue'. If 'lookupVariable' is NA, then replace *all* elements | |
##' of 'newVariable' with the value 'newValue'. | |
##' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2013 Landon Fuller <[email protected]> | |
* All rights reserved. | |
*/ | |
/* Interface to the native pcap(3) library */ | |
package pcap | |
/* | |
#cgo LDFLAGS: -lpcap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.core.application | |
import com.mongodb.casbah.Imports._ | |
import java.util.UUID | |
import com.example.domain.{User, Address, Customer} | |
/** | |
* Contains type classes that deserialize records from Casbah into "our" types. | |
*/ | |
trait CasbahDeserializers { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isTrue) | |
{ | |
// return true value | |
return true; | |
} | |
else | |
{ | |
// if not... | |
// return false value | |
return false; |