Skip to content

Instantly share code, notes, and snippets.

View zgunz42's full-sized avatar
๐Ÿ 
Working from home

I Kadek Adi Gunawan zgunz42

๐Ÿ 
Working from home
View GitHub Profile
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:rxdart/rxdart.dart';
class RiwayatKunjunganBloc {
final riwayatKunjunganAPI = RiwayatKunjunganAPI();
final _dateQuery = BehaviorSubject<DateTime>();
Observable<List<RiwayatKunjunganModel>> _results;
@zgunz42
zgunz42 / take_mock_quize.php
Last active November 22, 2020 11:30
views/quiz/take_mock_quize.php
<link rel="stylesheet" href="<?=base_url()?>css/mathquill.min.css" />
<script src="<?=base_url()?>js/mathquill.min.js"></script>
<!--************New Added Script By Kok Liang on 21-12-2019-->
<script src="<?php echo base_url()?>js/imgFunctions.js"></script>
<!--************New Added Script End-->
<!--************New Added Script Start-->
<link rel="stylesheet" href="<?php echo base_url()?>/node_modules/myscript/dist/myscript.min.css"/>
<link rel="stylesheet" href="<?php echo base_url()?>/css/examples.css">
@zgunz42
zgunz42 / demo.html
Last active November 27, 2020 09:32
render lesson
<ul>
<li>
<div>
<span>No Class</span
><label class="container-filter">
&nbsp;<input
type="checkbox"
id="undefined"
class="checkbox_filter checkbox_filter_ws"
value="undefined" /><span class="checkmark"></span
@zgunz42
zgunz42 / assign_lesson.php
Last active November 27, 2020 11:40
file dom html
<?php
if (count($my_students) == 0) {
echo '<div class="alert alert-danger">You have no students yet. Please add your student in <a href="'.base_url().'profile">profile</a> page first. Don\'t worry, you can visit this page again later!</div>';
}
?>
<style type="text/css">
#deassign_student_list ul {
margin: 0;
padding: 0;
import { boot } from 'quasar/wrappers';
// NOTE: maunya biar directive ini seperti gabungan dari v-bind dan v-on tapi enggak mau dia
export default boot(({ Vue }) => {
Vue.directive('cform', {
// When the bound element is inserted into the DOM...
bind(el, binding, vNode) {
if (!binding.arg) {
console.warn(`v-cform without argument does not support.`);
}
@zgunz42
zgunz42 / bulkdns.js
Created December 12, 2020 05:53
bulk delete dns record cloudflare
const axios = require('axios').default;
const _ = require('lodash');
const email = '<email>';
const key = '<global_key>';
const zone = '<zone>'
const url = `https://api.cloudflare.com/client/v4/zones/${zone}/dns_records`
function deleteRec(dns) {
@zgunz42
zgunz42 / Mongo.md
Created December 31, 2020 00:46 — forked from jnewman12/Mongo.md
Data Modeling With Mongo

Data Modeling with MongoDB

mongo


Objectives

  • Understand model relationships in MongoDB
  • Understand One-to-Many relationships
@zgunz42
zgunz42 / README.txt
Created March 16, 2021 08:23
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.7.4+commit.3f05b770.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
package main
import "fmt"
func getUserInput(input interface{}) (int, error) {
var err error
switch t := input.(type) {
case *int:
_, err = fmt.Scanf("%d", input)
case *string:
package main
import "fmt"
func mars_age(age int) int {
return age * 365/687
}
func main() {
var age int
fmt.Scanln(&age)