Skip to content

Instantly share code, notes, and snippets.

View sc0Vu's full-sized avatar
🎯
Focusing

Peter Lai sc0Vu

🎯
Focusing
View GitHub Profile
@hanxiao
hanxiao / testRegex.js
Last active September 21, 2024 17:50
Regex for chunking by using all semantic cues
// Updated: Aug. 20, 2024
// Run: node testRegex.js whatever.txt
// Live demo: https://jina.ai/tokenizer
// LICENSE: Apache-2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// COPYRIGHT: Jina AI
const fs = require('fs');
const util = require('util');
// Define variables for magic numbers
const MAX_HEADING_LENGTH = 7;
@MidSpike
MidSpike / readme.md
Last active July 19, 2024 20:45
CVE-2022-23812 | RIAEvangelist/node-ipc is malware / protest-ware
@sc0Vu
sc0Vu / install_go_pi.sh
Last active November 23, 2020 09:26
Install GO go1.13.4 on Raspberry Pi 3/Zero
filename=go1.13.4.linux-armv6l.tar.gz
gohash=9f76e6353c9ae2dcad1731b7239531eb8be2fe171f29f2a9c5040945a930fd41
sudo rm -rf /usr/local/go
wget https://dl.google.com/go/$filename
sudo tar -C /usr/local -xvf $filename
filehash=$(sha256sum $filename | cut -d ' ' -f1)
if [ $filehash != $gohash ]
then
echo "Filehash was not equal"
exit 0
@amochohan
amochohan / 01_Laravel 5 Simple ACL manager_Readme.md
Last active July 24, 2024 14:27
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php