Skip to content

Instantly share code, notes, and snippets.

View mimoccc's full-sized avatar

milan jurkulák mimoccc

View GitHub Profile
@mimoccc
mimoccc / UART3_enable.md
Created April 11, 2021 18:28 — forked from kashimAstro/UART3_enable.md
sunxi H3 enable UART3

#simple step for enable UART3 H3 allwinner sunxi
download suite sunxi:
git clone https://github.com/linux-sunxi/sunxi-tools
compile:
make
convert /boot/script.bin in .fex ascii file for editing:
./bin2fex /boot/script.bin ~script.fex

//Reveal View. Note: View should be invisible before revealing
currentTubeStatusContainer.setVisibility(View.INVISIBLE);
// Do the API compatibility check
new Timer().schedule(new TimerTask() {
@Override
public void run() {
getActivity().runOnUiThread(new Runnable() {
@Override
@mimoccc
mimoccc / ImageFlipper.java
Created June 15, 2019 21:31 — forked from balachandarlinks/ImageFlipper.java
ImageFlipper helps you to run a flip animation with a series of images on any ImageView.
public class ImageFlipper{
private static final int START_ANGLE = 90;
private static final int END_ANGLE = 270;
private int animationDuration = 800;
private ObjectAnimator flipObjectAnimator;
public ImageFlipper(final View targetView, final int[] drawableResources){
((ImageView)targetView).setImageResource(drawableResources[0]);
flipObjectAnimator = ObjectAnimator.ofFloat(targetView, "rotationY", START_ANGLE, END_ANGLE);
@mimoccc
mimoccc / contact_name_lookup.java
Created June 15, 2019 21:30 — forked from balachandarlinks/contact_name_lookup.java
Retrieve contact name by giving a phone number
/**
*
* @param context
* @param phoneNumber
* @return contactName
*/
public static String getContactName(Context context, String phoneNumber) {
Uri uri = Uri.withAppendedPath(
PhoneLookup.CONTENT_FILTER_URI,
/*
* Copyright (C) 2014 The Android Open Source Project
*
* 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
// Underhanded skullduggery to access the keystore daemon.
//
// This is merely a slightly cleaned up implementation of
// http://nelenkov.blogspot.com/2012/05/storing-application-secrets-in-androids.html
// and all credit to Nikolay for digging into this.
package org.kbsriram.android.util;
import android.content.Context;
import android.content.Intent;
@mimoccc
mimoccc / client.js
Created September 10, 2013 12:47 — forked from j4rs/client.js
var GCM = require('./gcm');
var gcm = new GCM(<YOUR GOOGLE API KEY>); // https://code.google.com/apis/console
// create the message
var msg = {
registration_ids: [token], // this is the device token (phone)
collapse_key: "your_collapse_key", // http://developer.android.com/guide/google/gcm/gcm.html#send-msg
time_to_live: 180, // just 30 minutes
data: {
@mimoccc
mimoccc / stratus-customization
Created September 26, 2012 14:42 — forked from leemartin/stratus-customization
Stratus Customization
<script type="text/javascript">
$(document).ready(function(){
$stratus({
auto_play: true,
download: false,
links: 'http://soundcloud.com/qotsa',
random: true
});
});
</script>