Skip to content

Instantly share code, notes, and snippets.

View c3stream's full-sized avatar

Kazuhiro Kondo c3stream

View GitHub Profile
val context = SSLContext.getInstance("TLSv1.2")
val allTrustManager = object : X509TrustManager {
override fun getAcceptedIssuers(): Array<out X509Certificate> = emptyArray()
override fun checkServerTrusted(chain: Array<out X509Certificate>?, authType: String?) {}
override fun checkClientTrusted(chain: Array<out X509Certificate>?, authType: String?) {}
}
// context.init(keyManager, trustManagers, random) // keyManager for providing specific certs, trustManager for system CA or your custom CA
context.init(null, arrayOf(allTrustManager), null)
val client = OkHttpClient.Builder()
@jmgirven
jmgirven / VariableSpeedMediaCodecVideoTrackRenderer.java
Last active February 28, 2018 05:47
A MediaCodecVideoTrackRenderer that allows playback rate to be changed. DemoPlayer has access to videoRenderer where the playback rate can be changed.
import android.content.Context;
import android.os.Handler;
import android.os.SystemClock;
import com.google.android.exoplayer.ExoPlaybackException;
import com.google.android.exoplayer.MediaClock;
import com.google.android.exoplayer.MediaCodecSelector;
import com.google.android.exoplayer.MediaCodecVideoTrackRenderer;
import com.google.android.exoplayer.SampleSource;
@YoshihitoAso
YoshihitoAso / gist:9444292
Last active August 29, 2015 13:57
[Hadoop][Hive][CDH4][Ubuntu]ubuntu上にhadoop擬似分散モード環境を構築

Ubuntu上にCDH4(Hadoop)擬似分散モード環境を構築する手順

※参考情報:OSのバージョン

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10
DISTRIB_CODENAME=quantal
DISTRIB_DESCRIPTION="Ubuntu 12.10"
@saetia
saetia / gist:1623487
Last active April 14, 2026 10:10
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat