Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Rafael Santiago rmxsantiago

🎯
Focusing
Block or report user

Report or block rmxsantiago

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
@rmxsantiago
rmxsantiago / FlattenArray.java
Created Jul 28, 2015
Problem: Write some code, that will flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4].
View FlattenArray.java
package br.com.rmxs.intercom;
import java.util.ArrayList;
import java.util.List;
public class FlattenArray {
public static void main(String[] args) {
/** Array to be flattened **/
/*Object[] inputArray = new Object[]{
@rmxsantiago
rmxsantiago / Customer.java
Created Aug 1, 2015
Problem: Write a program that will read the full list of customers and output the names and user ids of matching customers (within 100km), sorted by user id (ascending).
View Customer.java
package br.com.rmxs.intercom.entity;
/**
* Created by rmxsantiago on 7/29/15.
*/
public class Customer {
private long user_id;
private String name;
private double latitude;
private double longitude;
@rmxsantiago
rmxsantiago / Animal.lua
Last active Aug 13, 2016
Lua Inheritance
View Animal.lua
Animal = { name="undefined",sound="no sound" }
function Animal:new (newname, newsound)
local o = {name=newname,sound=newsound}
setmetatable(o, self)
self.__index = self
return o
end
function Animal:toString()
@rmxsantiago
rmxsantiago / Main.java
Created Aug 27, 2017
Regex which return content from each group
View Main.java
package com.company;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) {
Main main = new Main();
View Networking.java
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.http.GET;
import retrofit2.http.Query;
import java.util.List;
View videotest.json
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@rmxsantiago
rmxsantiago / atom-plugins.md
Last active Aug 15, 2019
Atom plugins I tested and use.
View atom-plugins.md
Name
language-liquid
language-markdown
atom-beautify
@rmxsantiago
rmxsantiago / php-env.md
Last active Sep 4, 2019
PHP Environment
View php-env.md

PHP

  • Run brew install php

Composer

This will generate composer.phar

  • Run mv composer.phar /usr/local/bin/composer

To check if composer is globally available, run composer --version

You can’t perform that action at this time.