This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package docker | |
import ( | |
"context" | |
_ "embed" | |
"fmt" | |
"io" | |
"os" | |
"github.com/docker/docker/api/types/container" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.20 | |
ARG timezone | |
ENV TIMEZONE=${timezone:-"Asia/Jakarta"} \ | |
APP_ENV=prod \ | |
SCAN_CACHEABLE=(true) | |
RUN wget https://dl.static-php.dev/static-php-cli/bulk/php-8.3.11-cli-linux-x86_64.tar.gz \ | |
&& tar zxvf php-8.3.11-cli-linux-x86_64.tar.gz \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Licensed to the Apache Software Foundation (ASF) under one or more | |
# contributor license agreements. See the NOTICE file distributed with | |
# this work for additional information regarding copyright ownership. | |
# The ASF licenses this file to You under the Apache License, Version 2.0 | |
# (the "License"); you may not use this file except in compliance with | |
# the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Pegawai | |
{ | |
public $nama = 'Budi'; | |
public $umur = 29; | |
} | |
foreach ((new Pegawai()) as $key => $value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pegawai = [ | |
[ | |
'nama' => 'Joni', | |
'umur' => 25, | |
], | |
[ | |
'nama' => 'Ani', | |
'umur' => 21, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
for ($i = 0; $i < 10; $i++) { | |
for ($x = 0; $x < 10; $x++) { | |
if ($i == 0 || $i == 9) { | |
echo '*'; | |
continue; | |
} | |
if ($x == 0 || $x == 9) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Pelanggan | |
{ | |
} | |
class Roti | |
{ | |
private $jumlah; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/gorilla/mux" | |
"net/http" | |
"github.com/codegangsta/negroni" | |
"encoding/json" | |
"strconv" | |
"time" | |
"gopkg.in/mgo.v2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Database | |
{ | |
/** | |
* @var \PDO | |
*/ | |
protected static $conn; | |
/** | |
* @return \PDO | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func random(min, max int) int { | |
rand.Seed(time.Now().UnixNano()) |
NewerOlder