Skip to content

Instantly share code, notes, and snippets.

View JuniYadi's full-sized avatar
🏠
Working from home

Juni Yadi JuniYadi

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python3
import os
import sys
import argparse
import re
import csv
from datetime import datetime, timezone
import pytz
@JuniYadi
JuniYadi / mac-vendor.txt
Created April 5, 2023 15:12 — forked from aallan/mac-vendor.txt
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
<?php
function generate_password($int = 12) {
$length = 32;
if (PHP_VERSION>=7) {
$bytes= random_bytes($length);
} else {
$bytes= openssl_random_pseudo_bytes($length);
}
@JuniYadi
JuniYadi / letsencrypt-dst-fix.sh
Created October 2, 2021 07:48
Fixed Expired SSL Let's Encrypt DST CA (Ubuntu/Debian)
#!/bin/bash
ISRG_CHECK=$( openssl x509 -noout -text -in /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt | grep Issuer | grep "CN = ISRG Root X1" )
if [[ ! $ISRG_CHECK ]]; then
mkdir -p /usr/share/ca-certificates/letsencrypt
curl -o /usr/share/ca-certificates/letsencrypt/ISRG_Root_X1.crt https://letsencrypt.org/certs/isrgrootx1.pem
sed -i 's/mozilla\/DST_Root_CA_X3.crt/!mozilla\/DST_Root_CA_X3.crt/g' /etc/ca-certificates.conf
echo "letsencrypt/ISRG_Root_X1.crt" | tee -a /etc/ca-certificates.conf
update-ca-certificates
fi
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber"
@JuniYadi
JuniYadi / signature.php
Created December 2, 2020 14:44 — forked from mmuoDev/signature.php
Adding signature to Laravel form.
For this to work, you have to include CDNs for JQuery and FabricJS.
***The View****
===The blade file===
The CSS
<style>
#sheet-container {
width: 250px;
height: 100px;
border: 1px solid black;
# Read more about setting it up
# https://medium.com/@ljmocic/deploying-react-application-to-aws-s3-using-github-actions-85addacaeace
on:
push:
tags:
- '*'
jobs:
build:
@JuniYadi
JuniYadi / Dockerfile
Created September 24, 2020 18:17 — forked from shov/Dockerfile
Docker PHP 7.2 fpm with GD jpg, png suppot
FROM php:7.2-fpm
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# make sure apt is up to date
RUN apt-get update --fix-missing
RUN apt-get install -y curl
RUN apt-get install -y build-essential libssl-dev zlib1g-dev libpng-dev libjpeg-dev libfreetype6-dev
@JuniYadi
JuniYadi / ubuntu-20.04-codec.md
Created September 14, 2020 08:54
Ubuntu 20.04 Codec
sudo apt update
sudo apt install libdvdnav4 libdvdread7 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libdvd-pkg
sudo apt install ubuntu-restricted-extras