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
def test(): | |
print "Cuman test" |
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
/* | |
README | |
------ | |
Below there's a class called BookLibraryApplication with only one method: main. | |
Your mission, should you choose to accept it, is to add codes _only_ in the sections labeled "PLACE YOUR CODE HERE" | |
in order to: | |
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
{ | |
"name": "Awesome Project", | |
"authors": [ | |
{ | |
"name": "Gilang Pambudi", | |
"email": "gilankpam@example.com" | |
} | |
], | |
"require": { | |
"slim/slim": "^3.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
FROM php:alpine | |
# Install composer | |
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ | |
php -r "if (hash_file('SHA384', 'composer-setup.php') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ | |
php composer-setup.php --install-dir=/bin --filename=composer && \ | |
php -r "unlink('composer-setup.php');" | |
RUN mkdir /app | |
# Copy semua source code ke directory /app dalam docker 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
version: '2' | |
services: | |
web: | |
# build image dari Dockerfile dalam directory yang sama | |
build: . | |
ports: | |
# {host}:{docker} | |
- 9090:8080 | |
volumes: | |
# mount semua source code project ke directory /app pada docker 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
<?php | |
require 'vendor/autoload.php'; | |
$app = new \Slim\App; | |
$app->get('/hello', function($request, $response) { | |
$response->getBody()->write("Hello, $name"); | |
return $response; |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
^f9::Send {Media_Prev} | |
^f10::Send {Media_Next} | |
^f11::Send {Volume_Down} | |
^f12::Send {Volume_Up} |
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
function reduxHelper (actionName, fn) { | |
if (typeof actionName !== 'string') { | |
throw new Error('actionName must be a string') | |
} | |
if (typeof fn !== 'function') { | |
throw new Error('fn must be a function') | |
} | |
const actionNameUpper = actionName.toUpperCase() | |
const actionRequest = actionNameUpper + '_REQUEST' | |
const actionSuccess = actionNameUpper + '_SUCCESS' |
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
const initialState = { | |
loading: false, | |
user: null, | |
error: null | |
} | |
export default function (state = initialState, action) { | |
switch(action.type) { | |
case 'LOGIN_REQUEST': | |
return { |
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
function login(username, password) { | |
return dispatch => { | |
dispatch({ | |
type: 'LOGIN_REQUEST' | |
}) | |
api.login(username, password) | |
.then(user => dispatch({ | |
type: 'LOGIN_SUCCESS', | |
user | |
})) |
OlderNewer