Skip to content

Instantly share code, notes, and snippets.

View burubur's full-sized avatar
🏠
Working from home

Burhan Mubarok burubur

🏠
Working from home
View GitHub Profile
db.collection.find(
// where clause
{
items: { $elemMatch : { "code": 3}}
},
// projection fields
{
_id: "_id",
order_id: "order_id"
// return matched status
#MySQL 5.7.12
#please drop objects you've created at the end of the script
#or check for their existance before creating
#'\\' is a delimiter
#select version() as 'mysql version';
\\
set @ids := '3,1';
\\
select @ids;
-- MySQL Script generated by MySQL Workbench
-- Tue Mar 27 13:09:38 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- -----------------------------------------------------
package main
import "fmt"
func main() {
fmt.Println("Even or Odd.")
evenOrOdd()
}
func evenOrOdd() {
package main
import (
"encoding/json"
"fmt"
"log"
"time"
)
// Movie doc
package main
import (
"fmt"
"math"
)
type hitung interface {
luas() float64
keliling() float64
@burubur
burubur / README.md
Last active August 16, 2018 09:14
SonarQube installation

SonarQube for a steril Go code

1. Code Quality Report Expected

![Expectation 1][expect1] ![Expectation 2][expect2]

2. Installation

Download from here:

@burubur
burubur / vertical-center.html
Last active January 12, 2019 04:58
Vertical Center with top & translateY
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body{
margin: 0;
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}",
"env": {},
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="favicon.ico">
<title>NginX</title>
<style>
body{