Skip to content

Instantly share code, notes, and snippets.

@knu2xs
knu2xs / init.d.md
Last active May 7, 2024 20:42
ArcGIS on Ubuntu Install Notes

No worries. You do need to copy it to the /etc/init.d as you mentioned. This will only tell the system how it can start/stop/restart the arcgisserver service. However you still need to tell it you want it to start at boot.

All the major distros now use something called systemD which handles starting up the system, so you have to do two other small things, listed below, to get it to start on boot.

To interact with system you mainly use the systemctl command to tell it what you want to do .

  1.  The following will tell systemD to start the arcgisserver service.

systemctl start arcgisserver

  1. This next command will tell systemD to start it EACH time it boots up.
@francois-rozet
francois-rozet / flow_matching.py
Last active May 7, 2024 20:40
Flow Matching in 100 LOC
#!/usr/bin/env python
import math
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
from sklearn.datasets import make_moons
from torch import Tensor
from tqdm import tqdm
@thevickypedia
thevickypedia / sphinx-pydantic.md
Last active May 7, 2024 20:38
Configure sphinx docs when using Pydantic

Sphinx Auto-docs and Pydantic Configuration

Sphinx autogen docs and pydantic don't get along.

Problem:

  • Using the BaseModel from pydantic takes the class members as arguments.
    • These arguments are displayed (along with the values) in the docs whether the user wants it or not.
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 7, 2024 20:37
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Zhuinden
Zhuinden / BasicTextFieldWithCursorAtEnd.kt
Last active May 7, 2024 20:37
A Compose TextField that initializes the cursor position at the end of the text, rather than the start, when focused without tapping the TextField manually.
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@nullmastermind
nullmastermind / how_to_use.rs
Last active May 7, 2024 20:34
Rust Valorant color aimbot - Yellow (Protanopia) (recommend fov < 128)
fn get_move_value(&mut self, is_trigger_bot: bool) -> Point {
if !is_trigger_bot {
let current_frame_id = self.latest_frame_id.lock().unwrap().clone();
if current_frame_id == self.current_frame_id {
return Point::new(0, 0);
}
self.current_frame_id = current_frame_id;
}
let current_frame = self.latest_frame.lock().unwrap().clone();
if current_frame.is_none() {
Alpine.directive('typed', (el, { expression, modifiers }, { evaluateLater, effect, cleanup }) => {
const getStrings = evaluateLater(expression);
const modifierValue = (key, fallback) => {
if (-1 === modifiers.indexOf(key)) {
return fallback;
}
const value = modifiers[modifiers.indexOf(key) + 1];
@mndambuki
mndambuki / officeActivator.bat
Created June 7, 2020 03:41
Activate Microsoft Office 2019
@echo off
title Activate Microsoft Office 2019 !
cls
echo ============================================================================
echo #Project: Activating Microsoft software products
echo ============================================================================
echo.
echo #Supported products:
echo - Microsoft Office Standard 2019
echo - Microsoft Office Professional Plus 2019
@zcroll
zcroll / JetBrains products Activation code until december 13 2024
Last active May 7, 2024 20:31
JetBrains products Activation code until december 13 2024
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL
@TheSoundDefense
TheSoundDefense / README.md
Last active May 7, 2024 20:31
Tutorial - how to create a LiveSplit component

Creating a LiveSplit component

Since LiveSplit's official documentation is a work in progress, and I couldn't find another guide for this anywhere else, I decided I would write my own. This will hopefully act as a good reference for getting started and making simple components, de-mystifying the process.

Things you will learn:

  • How to set up your Visual Studio project
  • How to set up the code structure of your component
  • How to create a simple InfoTextComponent (which displays a label on the left, and some text on the right)