Skip to content

Instantly share code, notes, and snippets.

View hibuno's full-sized avatar
🌙
Working at Night

Muhibbudin Suretno hibuno

🌙
Working at Night
View GitHub Profile
@hibuno
hibuno / script.js
Created November 11, 2017 02:20
Script for Audio Context Tutorial at my medium account (https://medium.com/@muhibbudins)
// Create Random Color
function colorize() {
return color[Math.round((Math.random() * 10))] || '#ffffff';
}
@hibuno
hibuno / index_full.html
Last active November 11, 2017 02:23
Script for Audio Context Tutorial at my medium account (https://medium.com/@muhibbudins)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SoundWave</title>
<style>
canvas {
background-color: #101010;
width: 600px;
height: 300px;
@hibuno
hibuno / notstandard.css
Last active January 9, 2018 20:22
Not standard CSS code
/* On some file */
.title {
font-size: 20px;
color: blue;
}
.description {
font-size: 14px;
}
@hibuno
hibuno / Example.vue
Created January 16, 2018 14:46
Example of vue component
<template>
<div>
<h1>Hello <span>World</span>!</h1>
<p>Nuxt make it so simple dude!</p>
</div>
</template>
<style lang="scss" scoped>
h1 {
color: red;
@hibuno
hibuno / directory_structure
Last active January 16, 2018 15:00
Directory Structure of Nuxt JS
assets/
components/
layouts/
\- default.vue
|- README.md
middleware/
pages/
\- index.vue
|- README.md
plugins/
@hibuno
hibuno / profile.vue
Created January 16, 2018 15:48
Sample page
<template>
<div>
<h2>Hello Dude!</h2>
<p>Nuxt it's so cool..</p>
</div>
</template>
@hibuno
hibuno / styling_profile.vue
Created January 16, 2018 16:09
Example styling profile page
<style>
html,
body {
padding: 0;
margin: 0;
}
body {
width: 100%;
height: 100vh;
display: flex;
@hibuno
hibuno / profile.vue
Created January 16, 2018 16:18
Adding JavaScript event on profile.vue
<template>
<div>
<h2>Hello Dude!</h2>
<p>{{ message }}</p>
<input type="text" v-model="message">
<button @click="showAlert">Show Message</button>
</div>
</template>
<script>
@hibuno
hibuno / blog.vue
Created January 16, 2018 16:33
Example component for layout
<template>
<div>
<h4>Ini header</h4>
<nuxt/>
<h4>Ini side bar</h4>
<h4>Ini footer</h4>
</div>
</template>
@hibuno
hibuno / detail.vue
Created January 16, 2018 16:35
Example of component when using custom layout on Nuxt
<template>
<div>
Ini isi dari halaman blog
</div>
</template>
<script>
export default {
layout: 'blog'
}