docker version
docker info
- mencari image di repository
{ | |
"id": "148edab2-3271-4bae-ab23-83112dc75008", | |
"version": "2.0", | |
"name": "Bootcamp Test", | |
"url": "http://localhost:8000", | |
"tests": [{ | |
"id": "49636379-e70e-4758-82db-e75616aad032", | |
"name": "Create Question", | |
"commands": [{ | |
"id": "a40351e3-33bd-44a7-ba54-835eb749cb50", |
version: '3' | |
networks: | |
localnet: | |
external: true | |
services: | |
php54: | |
image: pretzlaw/php:5.6-apache |
<?php | |
$file_db = "curhat.db"; | |
try { | |
$pdo = new PDO("sqlite:$file_db"); | |
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | |
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); | |
$sql_create = "CREATE TABLE IF NOT EXISTS `curhat`( |
from requests import get, post | |
class MoodleWS(): | |
"""Moodle webservice interface, thanks to https://github.com/mrcinv/moodle_api.py | |
""" | |
def __init__(self, key, url, endpoint): | |
self.key = key | |
self.url = url | |
self.endpoint = endpoint |
{'request': {'token': '', | |
'record[id_registrasi_mahasiswa]': {'type': 'uuid', | |
'primary': 'primary', | |
'nullable': 'not null', | |
'keterangan': 'Web Service: GetListRiwayatPendidikanMahasiswa'}, | |
'record[id_jenis_keluar]': {'type': 'character(1)', | |
'primary': '', | |
'nullable': 'not null', | |
'keterangan': 'Web Service: GetJenisKeluar'}, | |
'record[tanggal_keluar]': {'type': 'date', |
version: '3' | |
networks: | |
default: | |
driver: bridge | |
ipam: | |
config: | |
- subnet: 192.168.0.0/16 | |
services: |
from django.db import models | |
from django.contrib.humanize.templatetags.humanize import intcomma | |
class Package(models.Model): | |
PACK_STATUS = [('a', 'Aktif'), ('n', 'Non-Aktif')] | |
code = models.CharField('Kode', max_length=3, blank=True, null=True) | |
price = models.IntegerField('Harga', blank=False, null=False, default=0) | |
state = models.CharField('Status', max_length=1, choices=PACK_STATUS, default='a') | |
created_at = models.DateTimeField('dibuat', auto_now_add=True) | |
updated_at = models.DateTimeField('diupdate', auto_now=True) |
git rm -r --cached . | |
git add . | |
git commit -m "fixed untracked files" |
<?php | |
class Paginasi{ | |
function __construct($pdo_connect, $sql, $num_per_page, $url_pattern){ | |
$this->db = $pdo_connect; | |
$this->sql = $sql; | |
$this->npp = $num_per_page; | |
$this->url = 'http://'.$_SERVER['HTTP_HOST'].$url_pattern; | |
$this->cpage = (isset($_GET['p']) ? $_GET['p'] : 0); |