Skip to content

Instantly share code, notes, and snippets.

View hoangbits's full-sized avatar
🌍
Working from home

Le Gia Hoang hoangbits

🌍
Working from home
View GitHub Profile
@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 "*"
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 / 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
@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;
02-10 18:08:11.221 12592-12592/? W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.233 12592-12592/? W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.241 12592-12592/? W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.349 12592-12592/? W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.353 12592-12592/? W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.357 12592-12592/? W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.361 12592-12592/? W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.365 12592-12592/? W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.441 12592-12592/com.example.hoanglg.exchangerateviewer W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
02-10 18:08:11.441 12592-12592/com.example.hoanglg.exchangerateviewer W/Zygote: Zygote SIGCHLD error in waitpid: No child processes
<h:form>
<h:commandButton value="Deposit"
action="#{nganLuongBean.sentRequest}">
<f:ajax render="popup" />
</h:commandButton>
<h:panelGroup id="popup">
<ui:fragment rendered="#{not empty nganLuongBean.link_checkout}">
<script>
window
{
"extends": "airbnb",
"disallowMultipleVarDecl": false,
"rules": {
"one-var": 0,
"comma-dangle": 0,
"max-len": [0, 120, 4],
"indent": [2, 4],
"key-spacing": [2, {
"beforeColon": false,
{
"extends": "airbnb",
"disallowMultipleVarDecl": false,
"rules": {
"one-var": 0,
"comma-dangle": 0,
"max-len": [0, 120, 4],
"indent": [2, 4],
"key-spacing": [2, {
"beforeColon": false,
npm i -g npm-check-updates
npm-check-updates -u
npm install
<div class="row">
<div class="col-lg-12">
<% if (typeof success_msg !== 'undefined' && success_msg) { %>
<div class="alert alert-success"><%= success_msg %></div>
<% } %>
<% if(typeof error_msg !== 'undefined'){ %>
<div class="alert alert-danger"><%= error_msg %></div>
<% } %>
<% if (typeof error !== 'undefined' && error){ %>
<div class="alert alert-danger"><%= error %></div>