Skip to content

Instantly share code, notes, and snippets.

View petitTrung's full-sized avatar
💩

Trung Nguyen petitTrung

💩
  • Paris
View GitHub Profile
@petitTrung
petitTrung / GradientMap.kt
Created January 12, 2018 16:23 — forked from nickbutcher/GradientMap.kt
A prototype implementation of gradient mapping (https://bjango.com/articles/gradientmaps/) on Android.
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@petitTrung
petitTrung / ArcTranslateAnimation.java
Created December 11, 2016 00:42 — forked from guohai/ArcTranslateAnimation.java
Curved Path Animation in Android
import android.graphics.PointF;
import android.view.animation.Animation;
import android.view.animation.Transformation;
// http://www.math.ubc.ca/~cass/gfx/bezier.html
public class ArcTranslateAnimation extends Animation {
private int mFromXType = ABSOLUTE;
private int mToXType = ABSOLUTE;
@petitTrung
petitTrung / gif_creator.sh
Created September 8, 2016 04:42 — forked from cachapa/gif_creator.sh
Shell script to generate high-quality animated gifs from a video file
#!/bin/bash
# Based on http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
# Requires ffmpeg
filename="${1%.*}"
palette="/tmp/palette.png"
filters="scale=320:-1:flags=lanczos"
ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$filename.gif"
{
"Response": {
"ResponseMessage": "JsonProductService.FindSevenDaysTvSchedulesWithParameters - Return success",
"ResponseCode": 4,
"LangId": 0
},
"PlayerObj": [
{
"id": 872,
"logo": {