A Pen by Pedro Rojas on CodePen.
This file contains hidden or 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 ( | |
"encoding/json" | |
"fmt" | |
) | |
type AdminMenu struct { | |
Menu struct { | |
ID string `json:"id"` |
This file contains hidden or 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 | |
$eligible = true; | |
$hasCredit = false; | |
$message = $eligible ? | |
($hasCredit? 'Can use the credit':'Not enough credit') | |
: 'Not eligible to buy'; | |
echo $message; |
This file contains hidden or 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" | |
) | |
func main() { | |
elegible := true | |
hasCredit := false | |
This file contains hidden or 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
server { | |
server_name app-dsp.local; | |
root /var/www/html/app-dsp/public; | |
location / { | |
try_files $uri index.php @mezzio; | |
} | |
location @mezzio { | |
rewrite /(.*)$ /index.php?/$1 last; |
This file contains hidden or 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 php:7.3-apache | |
## Update package information | |
RUN apt-get update | |
## Configure Apache | |
RUN a2enmod rewrite \ | |
&& sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/sites-available/000-default.conf \ | |
&& mv /var/www/html /var/www/public |
This file contains hidden or 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 | |
// "internacionalization oso entertainment internacionalization oso entertainment ahho atto a2o a2o" => "i18n oso e11t internacionalization oso entertainment" | |
// "apa water a aa" | |
echo summarize("internacionalization oso entertainment"); | |
function summarize(string $input) | |
{ | |
$words = explode(" ", $input); |
This file contains hidden or 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
# For more information: https://laravel.com/docs/sail | |
version: '3' | |
services: | |
laravel.test: | |
build: | |
context: ./docker/8.0 | |
dockerfile: Dockerfile | |
args: | |
WWWGROUP: '${WWWGROUP}' | |
image: sail-8.0/app |
This file contains hidden or 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 ubuntu:21.10 | |
LABEL maintainer="Taylor Otwell" | |
ARG WWWGROUP | |
WORKDIR /var/www/html | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV TZ=UTC |
This file contains hidden or 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" | |
"io" | |
"io/ioutil" | |
"log" | |
"net/url" | |
"os" | |
"path/filepath" |
NewerOlder