Skip to content

Instantly share code, notes, and snippets.

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

Muhibbudin Suretno muhibbudins

🌙
Working at Night
View GitHub Profile
<script>
function handleMouseenter() {
console.log('Cursor memasuki halaman')
}
function handleMouseleave() {
console.log('Cursor meninggalkan halaman')
}
</script>
<script>
import {
onMount,
tick,
beforeUpdate,
afterUpdate,
onDestroy
} from 'svelte'
let photos = []
<script>
// Definisi static variabel
const picture = 'https://placekitten.com/400/400'
const string = `this string contains some <strong>HTML!!!</strong>`
// Definisi dynamic variabel
let count = 0;
let name = 'Dunia'
// Definisi fungsi
<script>
const Message = 'This is a simple page with Svelte'
function ShowAlert() {
alert('This is a simple alert')
}
</script>
<section class="section-wrapper">
<h1>Hi There,</h1>
<script>
const Message = 'Hi there, welcome!'
</script>
<section class="section-wrapper">
<p>{Message}</p>
</section>
<style>
.section-wrapper {
@muhibbudins
muhibbudins / MANUAL.md
Created August 7, 2018 01:51 — forked from s-lyn/MANUAL.md
Deploy nodejs app with gitlab.com and pm2

Deploy nodejs app with gitlab.com and pm2

This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:

  • Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
  • Windows 10 on my PC to work.
@muhibbudins
muhibbudins / String-capitalize.js
Created July 4, 2018 04:58
[Just for wasting time] Add-on function for String to capitalize a words
/* Add-on prototype function on String */
String.prototype.capitalize = function() {
var string = this.toString();
if (string.length === 0) return;
var split = string.split(' ');
return split.map(function(item) {
@muhibbudins
muhibbudins / SampleSlider.html
Created April 1, 2018 05:30
Video slider using slick
<!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>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.7/slick.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css">
@muhibbudins
muhibbudins / App.css
Created March 26, 2018 01:10
App.css for my tutorial
body {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: #39DCF5;
}
.hello_world-hello_world-4 {
width: 400px;
@muhibbudins
muhibbudins / App.js
Created March 26, 2018 01:09
App.js file for my tutorial
import React, { Component } from 'react';
import HelloWorld from './pagedraw/hello_world'
import './App.css'
class App extends Component {
constructor() {
super();
this.state = {
fullname: ''