Skip to content

Instantly share code, notes, and snippets.

View dkotama's full-sized avatar

Darma Kotama, I Nyoman dkotama

View GitHub Profile
@dkotama
dkotama / quotes.json
Last active September 13, 2022 08:29
{
"quotes": [
{
"author": "Kevin",
"quote": "https://i.ibb.co/YNWqYFN/Screenshot-188.png"
},
{
"author": "xxxuma yg suka donat pink, 2021",
"quote": "Masalah itu pelajaran. Masalah harus susah, kalau gampang untuk apa belajar lagi?"
},
@dkotama
dkotama / server.js
Created July 15, 2020 09:12
server.js buat kak ferdy
const express = require('express');
const app = express();
const cors = require('cors');
const http = require('http').createServer(app);
const path = require('path');
// setup cors
app.use(cors());
// serve static files

Keybase proof

I hereby claim:

  • I am dkotama on github.
  • I am dkotama (https://keybase.io/dkotama) on keybase.
  • I have a public key ASB6CQdZgmfhnh6HJFl4d8tPwVSwX7U8p6k38j6WeKF4mQo

To claim this, I am signing this object:

[ 0.000000] Linux version 4.15.0-88-generic (buildd@lgw01-amd64-036) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 (Ubuntu 4.15.0-88.88-generic 4.15.18)
[ 0.000000] Command line: earlyprintk=serial console=ttyS0 root=/dev/sda1 rw panic=1 no_timer_check
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
@dkotama
dkotama / QuestionModal.swift
Created September 10, 2018 00:10
Swift Question Modal
let alert = UIAlertController(title: NSLocalizedString("logout_confirm", comment: ""), message: "", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: { action in
self.pushLogout()
}))
alert.addAction(UIAlertAction(title: "No", style: .cancel, handler: nil))
self.present(alert, animated: true)
@dkotama
dkotama / MultipleModal.swift
Last active September 10, 2018 00:08
Swift Show Multiple Choices Modal
// in case i want to copy paste thing
let alertCtrl = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
let galleryBtn = UIAlertAction(title: NSLocalizedString("select_image", comment: ""), style: .destructive, handler: { (action) -> Void in
self.openGallery()
})
let deletePhotoBtn = UIAlertAction(title: NSLocalizedString("delete_image", comment: ""), style: .destructive, handler: { (action) -> Void in
self.editProfilePresenter?.pushUpdateValue(.image_id, values: self.imageId)