Skip to content

Instantly share code, notes, and snippets.

import llama_cpp
import re
import json
# Model configuration
# tested with mistral, llama2, llama3, and phi3
model_path = "/path/to/model"
base_llm = llama_cpp.Llama(model_path, seed=42, n_gpu_layers=-1, n_ctx=4096, verbose=False, temperature=0.0)
@rxaviers
rxaviers / gist:7360908
Last active May 6, 2024 03:49
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@aleduca
aleduca / powershell.txt
Last active May 6, 2024 03:47
Powershell - oh my posh
- Baixar o powershell: https://learn.microsoft.com/pt-br/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4#winget
- NerdFont: https://www.nerdfonts.com/font-downloads
- Oh My Posh: https://ohmyposh.dev/
- Criar arquivo de config: .$PROFILE ou code $PROFILE
- Instalar PSReadline: Install-Module PSReadLine -AllowPrerelease -Force
- Instalar icones: Import-Module -Name Terminal-Icons
- Apelido para comandos:
function executeArtisanCli {
php artisan $args
}
@hijrahsaputra
hijrahsaputra / Apple_mobile_device_types.txt
Created May 6, 2024 03:46 — forked from adamawolf/Apple_mobile_device_types.txt
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@al3xtjames
al3xtjames / flake.nix
Last active May 6, 2024 03:45
Thunderbolt NVM firmware
{
description = "Minimal NixOS installation media";
inputs.nixos.url = "nixpkgs/nixos-23.11";
outputs = { self, nixos }: {
nixosConfigurations = {
exampleIso = nixos.lib.nixosSystem {
system = "x86_64-linux";
modules = [
"${nixos}/nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5.nix"
({
@ethack
ethack / TypeClipboard.md
Last active May 6, 2024 03:41
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 6, 2024 03:41
ๅ›ฝๅ†…็š„ Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ๏ผŒ็”ฑๅ›ฝๅ†…ๆ•™่‚ฒๆœบๆž„ไธŽๅ„ๅคงไบ‘ๆœๅŠกๅ•†ๆไพ›็š„้•œๅƒๅŠ ้€ŸๆœๅŠก | Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

Docker Hub ้•œๅƒๅŠ ้€Ÿๅ™จ

ๅ›ฝๅ†…ไปŽ Docker Hub ๆ‹‰ๅ–้•œๅƒๆœ‰ๆ—ถไผš้‡ๅˆฐๅ›ฐ้šพ๏ผŒๆญคๆ—ถๅฏไปฅ้…็ฝฎ้•œๅƒๅŠ ้€Ÿๅ™จใ€‚Docker ๅฎ˜ๆ–นๅ’Œๅ›ฝๅ†…ๅพˆๅคšไบ‘ๆœๅŠกๅ•†้ƒฝๆไพ›ไบ†ๅ›ฝๅ†…ๅŠ ้€Ÿๅ™จๆœๅŠกใ€‚

Dockerized ๅฎž่ทต https://github.com/y0ngb1n/dockerized

้…็ฝฎๅŠ ้€Ÿๅœฐๅ€

Ubuntu 16.04+ใ€Debian 8+ใ€CentOS 7+

@Dinir
Dinir / chatbox.css
Last active May 6, 2024 03:40
Streamlabs Chat Box - Scrolling Sideway
body {
background: $background_color;
color: $text_color;
font-size: $font_size;
}
.colon, .name {
height: 0px;
}
@xl1
xl1 / gist:fe779a817a9d4938193d
Last active May 6, 2024 03:35
Facebook API: ๆœ‰ๅŠนๆœŸ้™ใฎ้•ทใ„ Access Token ใ‚’ๅ–ๅพ—ใ™ใ‚‹

Facebook API: ๆœ‰ๅŠนๆœŸ้™ใฎ้•ทใ„ Access Token ใ‚’ๅ–ๅพ—ใ™ใ‚‹

tl;dr

  1. User Access Token ใ‚’ๅ–ๅพ—ใ™ใ‚‹
  2. ใใ‚Œใ‚’ไฝฟใฃใฆ้•ทใ„ๆœŸ้™ใฎใƒˆใƒผใ‚ฏใƒณใ‚’ๅ–ๅพ—ใ™ใ‚‹
  3. /me/accounts?access_token={long_lived_token}
  4. ็„กๆœŸ้™ใฎใƒˆใƒผใ‚ฏใƒณใŒๆ‰‹ใซๅ…ฅใ‚‹

API ใฎใƒใƒผใ‚ธใƒงใƒณ