Skip to content

Instantly share code, notes, and snippets.

View bertzzie's full-sized avatar

Alex Xandra Albert Sim bertzzie

View GitHub Profile
@bertzzie
bertzzie / package_list_hyperv.txt
Created January 22, 2019 05:30
some description
grub2-common-2.02-0.76.el7.centos.noarch
kbd-legacy-1.15.5-15.el7.noarch
kexec-tools-2.0.15-21.el7.x86_64
bind-license-9.9.4-72.el7.noarch
ncurses-base-5.9-14.20130511.el7_4.noarch
bash-4.2.46-31.el7.x86_64
authconfig-6.2.8-30.el7.x86_64
glibc-common-2.17-260.el7.x86_64
setup-2.8.71-10.el7.noarch
microcode_ctl-2.1-47.el7.x86_64
@bertzzie
bertzzie / pods.txt
Last active December 10, 2018 09:26
describe kubectl
$ kubectl describe pods/flash-poll-6487c94d7d-26m5n
Name: flash-poll-6487c94d7d-26m5n
Namespace: default
Node: docker-for-desktop/192.168.65.3
Start Time: Mon, 10 Dec 2018 15:58:22 +0700
Labels: app=flash-poll
pod-template-hash=2043750838
Annotations: <none>
Status: Running
IP: 10.1.0.40
@bertzzie
bertzzie / Hello.scala
Created October 27, 2016 06:29
Scala Hello World and Basics
package com.example
object Hello {
// 0 - Functions
def printHelloWorld = println("Hello, world!")
def add5(num: Int): Int = num + 5
def add(a: Int, b: Int): Int = a + b
def sub(a: Int, b: Int) = a - b
// 1 - Looping
@bertzzie
bertzzie / gist:cca44a45bfed354e63b4
Last active August 29, 2015 14:11
Implementasi AJAX mirip $.ajax jQuery.
var MyLib = MyLib || {};
MyLib.AJAX = function (options) {
if ("method" in options &&
"url" in options &&
"onSuccess" in options) {
var xhr,
method = options.method,
data = options.data,
@bertzzie
bertzzie / gist:4427700
Last active December 10, 2015 11:29
PHP Session closing
<?php
session_start();
$_SESSION['user'] = 'testing';
echo "session before unset: " . $_SESSION['user'];
echo "<br>";
unset($_SESSION['user']);
@bertzzie
bertzzie / gist:4413020
Created December 30, 2012 14:22
Contoh AJAX pada <a>
index.php
<html>
<head>
<title>AJAX test</title>
<script type="text/javascript">
function func() {
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
httpRequest = new XMLHttpRequest();
// Credits to nategoose (http://stackoverflow.com/questions/351733/can-you-write-object-oriented-code-in-c/2733004#2733004)
// modified for clarity
struct stack {
struct stack_type * type;
// privates
};
struct stack_type {
void (* construct)(struct stack * this);
struct stack * (* operator_new)();