docker version
docker info
- mencari image di repository
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 16, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", |
| ''' | |
| Langkahnya adalah: | |
| - create db for new wordpress | |
| - create db user for new db | |
| - download latest WP | |
| - untar WP | |
| - run wordpress in browser | |
| ''' |
| <?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); |
| git rm -r --cached . | |
| git add . | |
| git commit -m "fixed untracked files" |
| 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) |
| version: '3' | |
| networks: | |
| default: | |
| driver: bridge | |
| ipam: | |
| config: | |
| - subnet: 192.168.0.0/16 | |
| services: |
| {'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', |
| 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 |
| <?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`( |