Skip to content

Instantly share code, notes, and snippets.

View AndreOneti's full-sized avatar
🎯
Focusing

André Oneti AndreOneti

🎯
Focusing
View GitHub Profile
@Lohann
Lohann / settings.json
Last active October 9, 2025 23:27
Rust VSCode Settings
{
"editor.inlineSuggest.enabled": true,
"editor.semanticHighlighting.enabled": true,
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"rust-analyzer.check.command": "clippy",
"rust-analyzer.check.extraArgs": [
"--",
"-Dwarnings",
@ezbik
ezbik / gist:4d43f66771aae9475ef7d36cc20a3aa0
Created September 14, 2022 02:40
anydesk installation + password set unattended (tested on Anydesk 6.2.0)
# define desktop user name
UU=vagrant
rm -rf /home/$UU/.anydesk
rm -rf /etc/anydesk
apt purge anydesk
wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | apt-key add -
echo "deb http://deb.anydesk.com/ all main" > /etc/apt/sources.list.d/anydesk-stable.list
apt update
@Lohann
Lohann / rsa-example.py
Last active February 6, 2026 11:55
Example of RSA encryption, digital signature and onion encryption
import random
import math
import hashlib
die = random.SystemRandom() # Secure random generator
##################
## Miller Rabin ##
##################
'''
@imami
imami / anydesk-enable-remote-access.md
Last active November 26, 2025 11:31
AnyDesk - How Enable Remote Access from ubuntu/debian terminal

###AnyDesk - How Enable Remote Access from ubuntu/debian terminal.

Note:

Here are the commands might be usefull in this purpose:

  • anydesk --get-status : To get current status of anydesk, which might be offlien,online or nothing.
  • anydesk --get-id : To get the ID that your system can be accessed by.
  • anydesk --service : To start anydesk service if not already running (for Linux).
  • anydesk --restart-service : To restart anydesk service
  • anydesk --stop-service : To stop anydesk service
@DannyDainton
DannyDainton / NewmanCustomHTMLReport.hbs
Created November 16, 2018 07:57
The is a custom HTML Report template that can be used with the Postman Newman Collection Runner
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Postman - Reports</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript">
//custom script
@komuw
komuw / python_named_pipe.py
Created November 1, 2018 15:23
python named pipe
import os
import errno
import time
"""
The linux pipe buffers are implemnted as circular buffers[1].
A consequence of the circular buffer is that when it is full and a subsequent write is performed:
(a) then it starts overwriting the oldest data[2].
(b) Alternatively, the routines that manage the buffer could prevent overwriting the data and return an error or raise an exception.
@naoki-sawada
naoki-sawada / client.js
Last active February 21, 2025 09:39
Simple socket.io room and auth example
const io = require('socket.io-client');
const socket = io('http://localhost:3000', {
transportOptions: {
polling: {
extraHeaders: {
'Authorization': 'Bearer abc',
},
},
},
@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@40
40 / httpQmlJson.qml
Created July 28, 2012 07:37
Simple HTTP JSON Request in QML
import bb.cascades 1.0
Page {
content: Container {
Label {
id: emailLabel
text: qsTr("Email")
}
Label {
id: urlLabel