Skip to content

Instantly share code, notes, and snippets.

View hoangbits's full-sized avatar
🏝️
Working from earth

Le Gia Hoang hoangbits

🏝️
Working from earth
  • Thanh Hoa, Vietnam
  • 03:28 (UTC +07:00)
View GitHub Profile
@hoangbits
hoangbits / FormUtils.java
Created December 3, 2016 11:30
uninstantiatable
/**
* Created by HoangLG on 12/3/2016.
*/
public class FormUtils {
public static boolean isMissing(String value){
return value == null || value.trim().isEmpty();
}
public static boolean isAnyMissing(String... values) {
boolean isMissing = false;
@hoangbits
hoangbits / Solution.java
Last active November 9, 2016 04:52
INNOVATUBE small test
//package com.example;
public class Solution {
public static void main(String[] args) {
int array[] = new int[4];
array[0] = 2;
array[1] = 3;
array[2] = 1;
array[3] = 5;
System.out.println(Solution.solution(array)); //it should return 4
class ArticlesController < ApplicationController
before_action :set_article, only: [:show, :edit, :update, :destroy]
# GET /articles
# GET /articles.json
def index
@articles = Article.all
@markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML)
end
@hoangbits
hoangbits / browser-sync
Created April 2, 2016 10:29
serve up the entire directory, not just the particular file
browser-sync start --server --directory --files "*"