Skip to content

Instantly share code, notes, and snippets.

View rashid2003's full-sized avatar
Trying Scala - A strong statically typed general-purpose language

Rashid Obaidi rashid2003

Trying Scala - A strong statically typed general-purpose language
View GitHub Profile
const handler = (request: Request): Response => {
const body = 'Hello World\n';
return new Response(body, { status: 200 });
};
import { serve } from "https://deno.land/std@0.145.0/http/server.ts";
const port = 8080;
const handler = (request: Request): Response => {
const body = 'Hello World\n';
return new Response(body, { status: 200 });
};
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\URL;
class ManagementController extends Controller
{
// we imagine the ( sccaned ) is array of scaned items the function will be like :
<?php
$sccaned = array("atv", "atv", "atv", "vga", "ipd", "ipd", "ipd", "ipd", "ipd");
$atv_price = 109.50;
$mbp_price = 1399.99;
$vga_price = 30.00;
$ipd_price = 549.99;
$size = sizeof($sccaned);
for ($x = 0; $x <= $size; $x++) {
if ($sccaned[$x] == "atv") {
// JSON Example
{
"employees": [
{
"name": "John Crichton",
"gender": "male"
},
{
"name": "Kmal Sun",
"gender": "female"
var koa = require('koa');
var jwt = require('koa-jwt');
var app = koa();
app.use(jwt({
secret: 'very-secret'
}));
// Protected middleware
GET : http://mywebsite.com/api/users ( fetching data )
POST : http://mywebsite.com/api/users/2 ( deleting data )
UPDATE : http://mywebsite.com/api/users/1 ( updating data )
PUT : http://mywebsite.com/api/users ( insert/add datat )
#!/bin/bash
echo "Hello world"
@rashid2003
rashid2003 / resume.html
Created May 28, 2018 11:18 — forked from theskumar/resume.html
html: resume Template (Basic)
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="container">