Skip to content

Instantly share code, notes, and snippets.

View cbedoy's full-sized avatar

Bedoy cbedoy

View GitHub Profile
@cbedoy
cbedoy / Free O'Reilly Books.md
Created June 20, 2019 04:14 — forked from augbog/Free O'Reilly Books.md
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
/**
*
* 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 February 21, 2018 02:36 — forked from PepDevils/gradle.java
Faster gradle compile for android
//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
call
https://develop.dagm8.com/api/user/2845fe481e74b9010a7913d7b214a8937972d6b1/conversations
@cbedoy
cbedoy / error.json
Last active February 24, 2018 05:16
Fields
{
"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
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 October 17, 2017 06:04
Example extract url from message or text :)
public String extractURL(String input)
{
if (input.length() == 0)
return null;
int[] positionsOfUrl = positionsOfUrl(input);
return input.substring(positionsOfUrl[0], positionsOfUrl[1]);
}
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 +
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 August 2, 2016 16:30
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
package cbedoy.pokemongoutils.abstracts;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.List;