Skip to content

Instantly share code, notes, and snippets.

@lukio
lukio / jsonrpc.py
Created May 11, 2022 09:37 — forked from kolyaflash/jsonrpc.py
Tryton 4 JSON-RPC example
import requests
import json
import base64
HOST = '127.0.0.1'
PORT = '8001'
CREDENTIALS = ('admin', 'admin') # login, password
class HttpClient:
@diegorodrigo90
diegorodrigo90 / garmin-express-wine.md
Last active November 22, 2025 18:10
Installing garmin express in linux with wine

First we start by creating a wineprefix and installing our prerequisites from terminal:

WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks dotnet452 vcrun2010 corefonts
WINEARCH=win32 WINEPREFIX=/home/$USER/GarminExpress winetricks win7
@yovko
yovko / ohmyzsh.md
Last active November 7, 2025 21:29
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.

set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
" Emulated Plugins
set surround
" set easymotion
set NERDTree
" Copy to system clipboard as well
@SKempin
SKempin / Git Subtree basics.md
Last active November 10, 2025 21:03
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@miguelmota
miguelmota / primes.json
Created December 15, 2015 02:31
Array of first 1,000 prime numbers
[
2,
3,
5,
7,
11,
13,
17,
19,
23,
@hallem
hallem / RestSharp_FileAsBody.cs
Last active December 29, 2024 21:10
RestSharp file as body
public RestApiResponse<bool> PutEnvelopesDocuments(string envelopeId, string documentId, string fullFileName, byte[] documentBytes)
{
RestRequest request = GetBaseRequest("envelopes/{envelopeId}/documents/{documentId}", Method.PUT);
request.AddUrlSegment("envelopeId", envelopeId);
request.AddUrlSegment("documentId", documentId);
request.AddHeader("Content-Type", "application/pdf");
request.AddHeader("Content-Disposition",
string.Format("file; filename=\"{0}\"; documentid={1}; fileExtension=\"{2}\"",
Path.GetFileNameWithoutExtension(fullFileName), documentId, Path.GetExtension(fullFileName)));