Skip to content

Instantly share code, notes, and snippets.

View rvi's full-sized avatar
Ship it.

Rémy Virin rvi

Ship it.
View GitHub Profile
@rvi
rvi / DateFormattersForAllLocales.csv
Last active September 7, 2023 09:52
Date formatter for all locales
Date format local Country or Region
yyyy/MM/dd eu Basque
dd. MM. yyyy. hr_BA Croatian (Bosnia & Herzegovina)
dd/MM/yyyy en_CM English (Cameroon)
MM/dd/yyyy en_BI English (Burundi)
dd/MM/yyyy en_AE English (United Arab Emirates)
yyyy-MM-dd rw_RW Kinyarwanda (Rwanda)
dd/MM/yyyy ast Asturian
dd/MM/yyyy en_SZ English (Eswatini)
dd.MM.yyyy he_IL Hebrew (Israel)
class StreamActivity : AppCompatActivity(), VlcListener {
private var vlcVideoLibrary: VlcVideoLibrary? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_stream)
val surfaceView = findViewById<SurfaceView>(R.id.surfaceView)
vlcVideoLibrary = VlcVideoLibrary(this, this, surfaceView)
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
compile 'com.github.pedroSG94.vlc-example-streamplayer:pedrovlc:2.5.14'
}
override fun requestPerformed(response: OnvifResponse) {
Log.d("ONVIF", "Request ${response.request.type} performed.")
Log.d("ONVIF","Succeeded: ${response.success},
message: ${response.parsingUIMessage}”)
if (response.request.type == GetServices) {
currentDevice.getDeviceInformation()
} else if (response.request.type == GetDeviceInformation) {
currentDevice.getProfiles()
class MainActivity : AppCompatActivity(), OnvifListener {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
currentDevice = OnvifDevice("IP_ADDRESS:PORT", "login", "pwd")
currentDevice.listener = this
currentDevice.getServices()
}
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2008-2017 by ONVIF: Open Network Video Interface Forum. All rights reserved.
Recipients of this document may copy, distribute, publish, or display this document so long as this copyright notice, license and disclaimer are retained with all copies of the document. No license is granted to modify this document.
THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND THEIR AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE; OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR RELATING TO ANY USE
@rvi
rvi / gist:daf067c404ca38218c90
Last active January 22, 2016 08:41
Trying to run a project after installing MobileVLCKit pod
Undefined symbols for architecture x86_64:
"std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::find(wchar_t const*, unsigned long, unsigned long) const", referenced from:
TagLib::String::find(TagLib::String const&, int) const in MobileVLCKit(tstring.cpp.o)
TagLib::String::split(TagLib::String const&) const in MobileVLCKit(tstring.cpp.o)
"std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::rfind(wchar_t const*, unsigned long, unsigned long) const", referenced from:
TagLib::String::rfind(TagLib::String const&, int) const in MobileVLCKit(tstring.cpp.o)
"std::string::find(char const*, unsigned long, unsigned long) const", referenced from:
dash::xml::DOMParser::isDash(stream_t*) in MobileVLCKit(libdash_plugin_la-DOMParser.o)
dash::xml::DOMParser::getProfile() in MobileVLCKit(libdash_plugin_la-DOMParser.o)
dash::mpd::BasicCMParser::parseCommonAttributesElements(dash::xml::Node*, dash::mpd::CommonAttributesElements*,
@rvi
rvi / 0_reuse_code.js
Created August 20, 2014 09:55
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rvi
rvi / buildAndTest
Last active December 30, 2015 07:29
Build and Test iOS project.
pod install
xcodebuild -workspace MyApp.xcworkspace -scheme "MyAppTests" -destination=build -configuration Debug -sdk iphonesimulator7.0 ONLY_ACTIVE_ARCH=YES clean build test
@rvi
rvi / buildAndPublish.sh
Last active March 1, 2018 10:13
Build, archive package iOS app and publish to testflight
pod install
xcodebuild -workspace MyProject.xcworkspace -scheme "MyScheme" -destination=build -configuration Release -sdk iphoneos7.0 ONLY_ACTIVE_ARCH=YES clean build archive
# Common path and partial filename
ARCHIVE_BASEPATH="${HOME}/Library/Developer/Xcode/Archives/$(date +%Y-%m-%d)/${XCODE_SCHEME}"
# Find the latest .xcarchive for the given scheme
NEW_ARCHIVE=$(ls -td "${ARCHIVE_BASEPATH}"* | head -n 1)