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\Http\Controllers; | |
use App\Models\RawEvent; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Http; | |
class SummarizeController extends Controller | |
{ |
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/bash | |
NS1="red" | |
NS2="blue" | |
VETH1="veth-red" | |
VETH1_BR="veth-red-br" | |
VETH2="veth-blue" | |
VETH2_BR="veth-blue-br" | |
VETH_BR="veth-br" | |
IP_ADDR1="10.0.0.1/24" |
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/bash | |
while true; do | |
xdotool keydown alt key Tab; sleep 2; xdotool keyup alt | |
sleep 30; | |
done | |
# First need to make executable by Run this command. | |
# chmod +x file_name.sh | |
# And then run like this from folder -> ./file_name.sh |
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
#================================= | |
# Author: MI SHAJIB | |
#================================= | |
import struct | |
# Sample packet in hex format | |
packet = b'450000280000400080060000c0a80101c0a80164' | |
# Convert packet to binary format |
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
//================================= | |
//# Author: MI SHAJIB | |
//================================= | |
// Sample packet in hex format | |
const packet = "450000280000400080060000c0a80101c0a80164"; | |
// Convert packet to binary format | |
const packetBinary = Buffer.from(packet, "hex"); |
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
//================================= | |
//# Author: MI SHAJIB | |
//================================= | |
// Import execSync for execute os command | |
const { execSync } = require("child_process"); | |
// Init data | |
const NS1 = "red"; | |
const NS2 = "blue"; |
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
#================================= | |
# Author: MI SHAJIB | |
#================================= | |
# Import necessary library for run command on OS(operating system) | |
import os | |
# Constants | |
NS1 = 'red' | |
NS2 = 'blue' |
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
{ | |
"calendars": [ | |
{ | |
"date": "2023-03-24", | |
"sehri_time": "04:39:00", | |
"iftar_time": "18:14:00" | |
}, | |
{ | |
"date": "2023-03-25", | |
"sehri_time": "04:38:00", |
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: Deploy website on push in production server | |
on: | |
push: | |
branches: | |
- production | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest |
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 | |
function removeEmailAndPhoneFromString($string) { | |
// remove email | |
$string = preg_replace('/([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)/', '*****', $string); | |
// remove phone | |
$string = preg_replace('/([0-9]+[\- ]?[0-9]+){4,}/', '*****', $string); | |
return $string; |
NewerOlder