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
#!/bin/sh | |
# menampilkan Hello world | |
echo "Hello world" | |
# declare variable NAME | |
NAME="Setya Novanto" | |
# menampilkan isi variable | |
echo ${NAME} |
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
#!/bin/sh | |
CURRENT_DATE=$(date +"%Y-%m-%d") | |
for FILENAME in $(ls | grep '\.java$') | |
do | |
cp ${FILENAME} ${FILENAME}.${CURRENT_DATE}.bak | |
done |
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" | |
"io" | |
"net/http" | |
) | |
func serve(w http.ResponseWriter, r *http.Request) { | |
w.Header().Set("Content-Type", "application/octet-stream") |
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/goFrendiAsgard/myproject/gen" | |
) | |
func init() { | |
// define gateway | |
gateway := gen.NewEmptyGateway(&Gen, |
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
[guldan@draenor ~]$ spark-shell | |
/usr/bin/hadoop | |
WARNING: HADOOP_SLAVES has been replaced by HADOOP_WORKERS. Using value of HADOOP_SLAVES. | |
2019-03-27 18:34:29 WARN NativeCodeLoader:60 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable | |
Setting default log level to "WARN". |
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" | |
"net/http" | |
) | |
type EventMessage struct { | |
Event string | |
Message interface{} | |
} |
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 ajax(obj) { | |
setTimeout(function () { | |
obj.success(obj.url); | |
}, 100); | |
} | |
let x; // 1 | |
ajax({ // 2 | |
url: "http://google.com", |
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 | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class Flight extends Model | |
{ | |
/** | |
* The table associated with the model. |
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
// filename: coba.rs | |
// compile: rustc coba.rs | |
// run: ./coba | |
// compile and run: rustc coba.rs && ./coba | |
use std::io; | |
fn main() { | |
let stdin = io::stdin(); |
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 Koa = require('koa'); | |
const app = new Koa(); | |
function middleWare1 (ctx, next) { // This is a function that return a promise | |
return new Promise((resolve, reject) => { | |
ctx.body = 'Hello'; | |
next().then(resolve).catch(reject); | |
}) | |
} |