Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Bedoy cbedoy

Block or report user

Report or block cbedoy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PubNubController.kt
/**
*
* Created by bedoy on 6/29/18.
*/
object PubNubController{
private const val TAG = "PNController"
private var pubNub: PubNub?= null
private var context : Context? = null
@cbedoy
cbedoy / gradle.java
Created Feb 21, 2018 — forked from PepDevils/gradle.java
Faster gradle compile for android
View gradle.java
//link:
// https://medium.com/@kevalpatel2106/how-to-decrease-your-gradle-build-time-by-65-310b572b0c43#.4rmzrcuj9
// https://gradle.org/install
//no terminal depois de ter o device instalado uma vez, usar
./gradlew android:assembleDebug --profile --configure-on-demand --daemon
// or this "app" root file name:
./gradlew app:assembleDebug --profile --configure-on-demand --daemon
View response.json
call
https://develop.dagm8.com/api/user/2845fe481e74b9010a7913d7b214a8937972d6b1/conversations
View error.json
{
"Message": "An error has occurred.",
"ExceptionMessage": "Referencia a objeto no establecida como instancia de un objeto.",
"ExceptionType": "System.NullReferenceException",
"StackTrace": " en WebAPI_FRAGATSA.Controllers.Luminaria_InstalacionController.<PostTbl_Luminaria_Instalacion>d__4.MoveNext() en C:\\RB\\proyectos\\FRAGATSA\\SISTEMA\\FRAGATSA_GIT\\WebAPI_FRAGATSA\\Controllers\\Luminaria_InstalacionController.cs:línea 346\r\n--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---\r\n en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n en System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__3`1.MoveNext()\r\n--- Fin del seguimiento de la pila de la ubicación anterior donde se produjo la excepción ---\r\n en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n en System.Runtime.CompilerServ
View InstallationViewController.kt
package cbedoy.appluminara.backend.installation
import android.Manifest
import android.annotation.SuppressLint
import android.location.Address
import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.OrientationHelper
import android.view.LayoutInflater
import android.view.View
@cbedoy
cbedoy / chat_util.java
Created Oct 17, 2017
Example extract url from message or text :)
View chat_util.java
public String extractURL(String input)
{
if (input.length() == 0)
return null;
int[] positionsOfUrl = positionsOfUrl(input);
return input.substring(positionsOfUrl[0], positionsOfUrl[1]);
}
View gist:91696fb321f2ca1ac7af96e8e0ec7b57
From bitbucket.org:dagm8/ios
* branch develop -> FETCH_HEAD
Updating 3abd9f1e..3b15a7cb
Fast-forward
Dagm8.xcodeproj/project.pbxproj | 1747 ++++++++++++++++++++++++++++++++++++++++++++++---------
Dagm8/AppDelegate.m | 18 +-
Dagm8/Assemblies/FeedDetailAssembly.h | 5 +
Dagm8/Assemblies/FeedDetailAssembly.m | 6 +-
Dagm8/Assemblies/FeedsAssembly.h | 5 +
Dagm8/Assemblies/FeedsAssembly.m | 6 +
View gist:e016d96aba2ab06ec311b0b6ec8f3bdc
git log --author=$USER --shortstat $BRANCH | \
awk '/^ [0-9]/ { f += $1; i += $4; d += $6 } \
END { printf("%d files changed, %d insertions(+), %d deletions(-)", f, i, d) }'
@cbedoy
cbedoy / AbstractCell.java
Created Aug 2, 2016
Sometimes if you want to follow the view holder design patters by list views on Android, always you should write the same code everytime for each adapter that you want, in this case should extends a class from AbstractCell (there is a template, by create you view, instance your view holder, and reload it) so easy :D
View AbstractCell.java
package cbedoy.pokemongoutils.abstracts;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.List;
@cbedoy
cbedoy / NewRestService.java
Created Jan 21, 2016
NewRestService.java
View NewRestService.java
package org.pademobile.com.services;
import android.os.AsyncTask;
import android.os.Build;
import android.util.Pair;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import org.pademobile.com.interfaces.IConnectivityService;
You can’t perform that action at this time.