Skip to content

Instantly share code, notes, and snippets.

View HilmiZul's full-sized avatar
💜
"i do code for fun"

Zul Hilmi HilmiZul

💜
"i do code for fun"
View GitHub Profile
@HilmiZul
HilmiZul / input-select.html
Last active July 18, 2021 14:58
input select with select2: https://select2.org/
<!-- hilmizul / 18 Juli 2021 -->
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/select2.min.css" rel="stylesheet" />
</head>
<body>
@HilmiZul
HilmiZul / django-deploy.md
Last active July 9, 2024 03:42
step by step nge-deploy projek django ke server (ubuntu 16.04 server)

Langkah-langkah deployment aplikasi yang dibuat dengan Django. Repository project: https://github.com/writerlab/perpus

Update dan Insatall kebutuhan development

sudo apt-get update
sudo apt-get install python3-pip python3-dev nginx

Upgrade pip & install virtualenv

Tools Dasar:
1. Text Editor. bisa pakai Visual Studio Code: https://visualstudio.microsoft.com/downloads/
2. Google Chrome
Kebutuhan:
1. p5js: https://github.com/processing/p5.js/releases/download/1.0.0/p5.zip
Setup & Instalasi:
1. Buat folder BDAY di Desktop
@HilmiZul
HilmiZul / login.py
Created November 27, 2019 02:27
Login with text as database
def login(user, password):
with open("user.txt") as f:
isi = f.readlines()
isi = [x.strip() for x in isi]
if user == isi[0] and password == isi[1]:
print("Login Berhasil")
else:
print("User dan Password tidak cocok!")
@HilmiZul
HilmiZul / gist:67bc19a0a16260358f12a327195e7cb3
Created August 4, 2019 18:24 — forked from grandmanitou/gist:8863248
Place multiple markers with infowindow on Google Maps API v3, use external links to trigger click and center map on desired location.
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?language=fra&amp;sensor=false"></script>
<script type="text/javascript">
var map;
var Markers = {};
var infowindow;
var locations = [
[
'Samsung Store Madeleine',
'<strong>Samsung Store Madeleine</strong><p>5 Boulevard Malesherbes, 75008 Paris<br>10h – 20h</p>',
48.8701925,
@HilmiZul
HilmiZul / cek-jawaban.py
Last active July 19, 2020 03:45
simalasi cek jawaban pilihan ganda
# Simulasi Cek Jawaban Pilihan Ganda
# 21 Maret 2019
# Zul Hilmi
# update: in python3
# kunci jawaban
kunci = ['a', 'b', 'a', 'c', 'a']
# fungsi cek jawaban menerima param string: 'abcde...'
def cek(jawaban):
</style>
.rect {
position: absolute;
top: 50%;
left: 50%;
width: 120px;
height: 120px;
margin:-60px 0 0 -60px;
animation:spin 3s linear infinite;
border-radius: 20%;
@HilmiZul
HilmiZul / stats-map.php
Created October 20, 2018 11:07
LOL 😂
<div class="card">
<?php if($result) {?>
<div class="header">
<div class="alert alert-danger">
<p><em>Silahkan Filter terlebih dahulu.</em></p>
</div>
</div>
<?php } ?>
<div class="content">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="isolation:isolate" viewBox="0 0 700 900" class="peta">
@HilmiZul
HilmiZul / py-wheezy.md
Last active October 6, 2018 15:48
[Basic] Setup Py for web development with Django on Debian Wheezy 😁

Install clang

$ sudo apt-get update && apt-get install clang

Python 2.7.15 (Latest)

Remove python 2.7.3

$ sudo apt-get purge python2.x-minimal

or

@HilmiZul
HilmiZul / grav.js
Last active September 29, 2018 20:08
catatan kecil simulasi benda (seolah) jatuh.
/* grav.js
* 30 September 2018, 3:00 A.M.
*/
function grav() {
this.g = 0.9; // gravitasi
this.vel = 0; // init 0 yang nanti ditambah dengan nilai gravitasi saat benda jatoh.
// saat benda jatoh:
// kecapatan benda akan terus bertambah dengan tarikan gravitasi?