Skip to content

Instantly share code, notes, and snippets.

@CodexisPhantom
CodexisPhantom / updater.md
Last active January 17, 2025 00:22
Automatic fivem update (LINUX)

Hello everyone, I have create a small bash script for linux that automatically get the latest fivem artifact from the new jgscript artifact website. This small tutorial will help you create the script and a linux service so that you can update and run your server automatically after a server restart.

First create a server.sh file on your server (configure it as you like) :

#!/bin/bash

ARTIFACTS_URL="https://artifacts.jgscripts.com/json"
DOWNLOAD_DIR="/tmp/fivem_artifact"
EXTRACT_DIR="/home/codexis/server"
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active January 17, 2025 00:21
set -e, -u, -o, -x pipefail explanation
@joepie91
joepie91 / vpn.md
Last active January 17, 2025 00:21
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@osama2kabdullah
osama2kabdullah / Tailwind CSS with Shopify Theme.md
Created June 12, 2023 08:45
How to add Tailwind CSS in a shopify theme in development mode only

Add Tailwind CSS in Shopify Theme

  1. Initial node.js package manager with npm or yarn by running
yarn init -y 
#or
npm init -y
@kaustavdm
kaustavdm / main.go
Last active January 17, 2025 00:15
Embed NATS in Go
package main
import (
"flag"
"log"
"github.com/nats-io/nats-server/v2/server"
nats "github.com/nats-io/nats.go"
)
@brt-h
brt-h / 12-31-21-python-challenges-from-edabit.ipynb
Last active January 17, 2025 00:12
12-31-21-python-challenges-from-edabit.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wilsonsilva
wilsonsilva / undo_last_commit.sh
Created June 21, 2017 15:47
Undo last commit but keep changes
# https://stackoverflow.com/a/44672195/3013522
git reset --soft HEAD~1
@daveh
daveh / Container.php
Last active January 17, 2025 00:09
Dependency Injection in PHP (code to accompany https://youtu.be/TqMXzEK0nsA)
<?php
class Container
{
private array $registry = [];
public function set(string $name, Closure $value): void
{
$this->registry[$name] = $value;
}
@peterc
peterc / sinatra-react.md
Last active January 17, 2025 00:09
How to set up a basic Sinatra + React webapp

How to set up a basic Sinatra + React webapp in 2025

Let's say you want to use Ruby for the backend of a basic webapp but React on the frontend. Here's how.

(Note: All tested on January 13, 2025 with Ruby 3.3, Sinatra 4.1.1, and React 18.3. Configs may change over time.)

First, create the app folder and set up Sinatra:

mkdir my-sinatra-react-app