Skip to content

Instantly share code, notes, and snippets.

View saishaddai's full-sized avatar
💭
Dig my way back to development

Saidel Lopez saishaddai

💭
Dig my way back to development
View GitHub Profile
@saishaddai
saishaddai / decks.json
Created March 15, 2019 19:24
Decks JSON example
{
"decks":[
{
"id":1,
"name":"Java",
"description":"Java 7 facts and fun"
},
{
"id":2,
"name":"Kotlin",
@saishaddai
saishaddai / android_cards.json
Last active March 15, 2019 19:18
Cards service json example
{
"cards":[
{
"id":1,
"title":"<p>Super Title<p>",
"content":"<p>Well, the way they make shows is, they make one show. That show's called a pilot. Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows. Some pilots get picked and become television programs. Some don't, become nothing. She starred in one of the ones that became nothing. </p><p>My money's in that office, right? If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too. Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot. You understand?</p>",
"image_url":"image1.jpg",
"deck":"Java"
package com.saishaddai.bwq
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.view.animation.AnimationUtils
import android.widget.TextView
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
@saishaddai
saishaddai / bounce_animation.xml
Created March 4, 2019 06:08
anim for android to get a bouncing View
<?xml version="1.0" encoding="utf-8">
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true" android:interpolator="@android:anim/bounce_interpolator">
<scale
android:fromXScale="1.0dp"
android:fromYScale="0.0dp"
android:toXScale="1.0dp"
android:toYScale="1.0dp"
android:duration="600" />
@saishaddai
saishaddai / test.xml
Created November 3, 2018 01:55
static test of a possible XML response
<test>This is a test of static content</test>
{
"outboundRoutes": [
{
"hasAirportChange": false,
"type": "AIR",
"segments": [
{
"arrival": {
@saishaddai
saishaddai / Singleton
Last active August 29, 2015 13:57
Singleton in Java
//OPTION 1 using enums
//Each element in the enum is unique and keep their last modified values
//even when used by threads the values of the elements are the same
//they can be accessed via Currentcy.DIME and so
//everytime you instance class Animal, the values keep the last state they were
public enum Animal {
CAT("meow"), DOG("bark"), ELEPHANT("WTF"), HUMAN("talk");
}