Skip to content

Instantly share code, notes, and snippets.

View osamaAbdullah's full-sized avatar
🎯
Focusing

osama osamaAbdullah

🎯
Focusing
  • Aso
  • iraq
View GitHub Profile
@osamaAbdullah
osamaAbdullah / csvImportToDB.php
Created July 17, 2020 23:25
reading csv file and inserting it in the database
public function importCsv($model, $fileName)
{
$model = '\\App\\Models\\' . $model;
$file = public_path('csv/' . $fileName . '.csv');
$arr = $this->csvToArray($file);
foreach ($arr as $row)
{
unset($row['id']);
function walker({name}) {
return {
walk: () => console.log(name + ' can walk'),
}
}
function attacker({name}) {
return {
attack: () => console.log(name + ' can attack'),
}
}
@osamaAbdullah
osamaAbdullah / suspense
Created December 5, 2022 19:21
suspense with async data fetching
import { Suspense } from 'react';
export default function Test() {
return (
<Suspense fallback={<h1>Loading...</h1>}>
<Shows />
</Suspense>
);
}
version: '3.3'
services:
certbot:
image: certbot/certbot
entrypoint: "certbot certonly --standalone --non-interactive --preferred-challenges http --email osama_akre@icloud.com --agree-tos -d x.com,x.x.com"
volumes:
- ./letsencrypt:/etc/letsencrypt
ports:
- 80:80
#!/bin/sh
SERVICES=$(echo "$DEPENDENCIES" | tr "|" "\n")
resolve()
{
for SERVICE in $SERVICES; do
ip=$(nslookup "$SERVICE" | awk '/^Address: / { print $2 }')