exec - Returns last line of commands output
passthru - Passes commands output directly to the browser
system - Passes commands output directly to the browser and returns last line
shell_exec - Returns commands output
\`\` (backticks) - Same as shell_exec()
popen - Opens read or write pipe to process of a command
proc_open - Similar to popen() but greater degree of control
pcntl_exec - Executes a program
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
#!/env/python | |
# send HTTP POST with empty body | |
# taken from https://stackoverflow.com/a/64860348/2496217 | |
from urllib import request | |
req = request.Request( | |
'https://postman-echo.com/post', | |
method='POST', |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Analyze Github Stats</title> | |
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script> | |
<style> | |
table { | |
font-family: Arial, Helvetica, sans-serif; | |
border-collapse: collapse; |
TL;DR
Install Postgres 9.6, and then:
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
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
public function actionImsakiyah() | |
{ | |
$model = new \app\models\Imsakiyah(); | |
$jadwal = null; | |
if ($model->load(\Yii::$app->request->get(), '') && $model->validate()) { | |
$jadwal = $model->getImsakiyah(); | |
} | |
return $this->render('imsakiyah', ['model' => $model, 'jadwal' => $jadwal]); | |
} |
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 ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
type test_struct struct { | |
Test string |