Skip to content

Instantly share code, notes, and snippets.

@kcochibili
kcochibili / installBaasBoxLinuxGoogleComputeEngine.sh
Last active February 18, 2017 08:10
How to deploy BaasBox on a Linux server in Google Compute Engine
# Go to https://cloud.google.com/compute/
#create a project,
#create an instance
#follow this video to open port 9000 for Baasbox https://www.youtube.com/watch?v=qAV__Rq4vIQ (pay atention to where the demonstrator initialy clicks his mouse)
# launch SSH for your instance (by clicking SSH button)
# While in the SSH, enter the commands bellow, run the commands by clicking the Enter key after each command, wait for each command to run before running the next.
# Install Java
@kcochibili
kcochibili / TextToSpeech.java
Created May 20, 2017 05:24
TextToSpeech sample Java
package com.ducky.tempo;
import java.util.Locale;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.view.View;
@kcochibili
kcochibili / TextToSpeech.xml
Created May 20, 2017 05:27
simple TextToSpeech xml layouut
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<Button
android:id="@+id/talk_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@kcochibili
kcochibili / commandline.md
Created July 21, 2017 16:46 — forked from evanwill/commandline.md
command line mini workshop

Intro to the Command Line

Does command line interface (CLI), REPL, terminal, console, or shell sound scary? Don't worry, we'll learn about the basic computer interface that gives you super powers! If you want to work with Raspberry Pi, Linux, or many programming languages you need a basic familiarity with the CLI. This MILL-Mini will demystify the terminal so you can use it to get things done.

What is the Shell?

The command line is a text-based interface for efficiently getting stuff done. It's often called the shell, terminal, console, cmd, or Bash, but ultimately the Shell is just a program on your computer like any other application. Its job is to act as a command shell, taking input from the user, ordering the computer's operating system (OS) to execute the instructions, and returning the outputs.

@kcochibili
kcochibili / BillingHolder.java
Last active November 16, 2022 03:50
Singleton class that fixes the issue with the android-inapp-billing-v3 library. This fix allows you to flawlessly use the BillingProcessor in multiple activities, without encountering this issue: https://github.com/anjlab/android-inapp-billing-v3/issues/503
package com.your.package.name;
import android.app.Activity;
import com.anjlab.android.iab.v3.BillingProcessor;
// This singleton class is designed to fix this issue: https://github.com/anjlab/android-inapp-billing-v3/issues/503
// the solution is based on this suggestion: https://github.com/anjlab/android-inapp-billing-v3/issues/501#issuecomment-962612355
public class BillingHolder {