Skip to content

Instantly share code, notes, and snippets.

View entrptaher's full-sized avatar
🎯
Focusing

Md. Abu Taher entrptaher

🎯
Focusing
View GitHub Profile
@rain-1
rain-1 / LLM.md
Last active September 24, 2024 01:48
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@mikeslattery
mikeslattery / ssh2config.sh
Last active May 20, 2024 13:13
Convert shell history or CLI args into ~/.ssh/config format.
#!/bin/bash
ssh2append() {
ssh -G "$@" | sed -n 's/^hostname /Host /p'
comm -23 <(ssh -G "$@" 2>/dev/null | sort) <(ssh -G . 2>/dev/null | sort) | sed 's/^/ /'
# This loop+if is for remote command, -N, -W as -G lacks support
while getopts '1246AaCfGgKkMNnqsTtVvXxYyB:b:c:D:E:e:F:I:i:J:L:l:m:O:o:p:Q:R:S:W:w:' opt; do
#shellcheck disable=SC2254
case "$opt" in
@rishabhrpg
rishabhrpg / puppeteer_on_termux.md
Last active September 19, 2024 14:59
Run puppeteer inside termux

Run Puppeteer inside termux

Assumptions

  • You have termux installed and have sufficient permissions
  • You have loggedin as root user
  • You are okay with running Puppeteer inside a container (Alpine)

Gotchas

  • There is no build of Google Chrome available for ARM at this moment, so using chromium instead.
  • Installing chromium on Termux directly requires snap which is another big hurdle so alternively using alpine distro here.
@anshulrgoyal
anshulrgoyal / task.rs
Created April 12, 2020 22:21
Napi Async Example
use nodejs_sys::{
napi_async_work, napi_callback_info, napi_create_async_work, napi_create_promise,
napi_deferred, napi_delete_async_work, napi_env, napi_get_cb_info, napi_queue_async_work,
napi_resolve_deferred, napi_status, napi_value,napi_reject_deferred,napi_create_error
};
use std::ffi::c_void;
use crate::{request, scrap, types};
#[derive(Debug, Clone)]
@faghani
faghani / 00-php-memory-limits.ini
Last active January 16, 2024 17:22
Caddy Laravel Dockerfile
; Max memory per instance
memory_limit = 128M
;The maximum size of an uploaded file.
upload_max_filesize = 128M
;Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize
post_max_size = 128M
@Baldinof
Baldinof / .dockerignore
Last active February 13, 2024 22:52
Single PHP FPM container with Caddy
/vendor
/docker
/Dockerfile
#!/bin/bash
#Author: Guido Diepen
#Convenience script that can help me to easily create a clone of a given
#data volume. The script is mainly useful if you are using named volumes
#First check if the user provided all needed arguments
if [ "$1" = "" ]
@nicoandmee
nicoandmee / puppeteer-bot.js
Created March 26, 2019 20:29
disguisePage - undetectable puppeteer
const WEBGL_RENDERERS = ['ANGLE (NVIDIA Quadro 2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (NVIDIA Quadro K420 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro 2000M Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro K2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (ATI Radeon HD 3800 Series Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (AMD Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 3000 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Mobile Intel(R) 4 Seri
@rodrigo-brito
rodrigo-brito / caddyproxy_mkcert.Caddyfile
Created October 18, 2018 11:08
Caddy proxy with HTTPS - Mkcert
id.cifraclub.com.br {
log stdout
# Mkcert - https://github.com/FiloSottile/mkcert
tls ./yourwebsite.com.br.pem ./yourwebsite.com.br-key.pem
proxy / https://yourwebsite.com {
transparent
header_upstream X-Marotagem true
header_upstream Host "yourwebsite.com.br"
}