Skip to content

Instantly share code, notes, and snippets.

View milad-rasouli's full-sized avatar
✏️
💪😎💻

Milad Rasouli milad-rasouli

✏️
💪😎💻
View GitHub Profile
@mixalbl4-127
mixalbl4-127 / VNC_Server_On_Ubuntu_22.04LTS.md
Last active November 26, 2025 11:35 — forked from indyfromoz/VNC_Server_On_Ubuntu_22.04LTS.md
VNC+xfce4 setup on Ubuntu server 22.04 LTS

Setup

Install xfce4

sudo apt update
sudo apt install xfce4 xfce4-goodies

Install TigerVNC -

@codeSTACKr
codeSTACKr / mongodb_cheat_sheet_2022.md
Created January 10, 2022 22:54
MongoDB Cheat Sheet 2022
@ppLorins
ppLorins / bidi-server-cus.cc
Created July 18, 2019 07:22
an example for the bidirectional streaming async grpc c++ server.
/*
*
* Copyright 2016, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
@amrza
amrza / aria.sh
Created April 21, 2018 15:50
Download List of files with aria2
#!/bin/sh
aria2c --dir=./ --input-file=urls.txt --max-concurrent-downloads=1 --connect-timeout=60 --max-connection-per-server=16 --split=16 --min-split-size=1M --human-readable=true --download-result=full --file-allocation=none
date
# Now create this file in the same directory and paste all urls in it: urls.txt
@ilius
ilius / jalali-plpgsql.sql
Last active June 11, 2024 05:52
Jalali Date Conversion in PL/pgSQL
create or replace function epoch_to_jd(float) RETURNS int as $$
BEGIN
return ($1 / (24*3600) + 2440588)::int;
END;
$$ LANGUAGE plpgsql;
create or replace function timestamp_to_jd(timestamp with time zone) RETURNS int as $$
BEGIN
return epoch_to_jd(extract (epoch from $1));
@gitaarik
gitaarik / git_submodules.md
Last active November 23, 2025 15:50
Git Submodules basic explanation

Git Submodules - Basic Explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@snaewe
snaewe / read_with_timeout.cc
Created September 4, 2011 07:50
boost::asio - async read with timeout
void set_result(optional<error_code>* a, error_code b)
{
a->reset(b);
}
template <typename MutableBufferSequence>
void read_with_timeout(tcp::socket& sock,
const MutableBufferSequence& buffers)
{
optional<error_code> timer_result;
deadline_timer timer(sock.io_service());
@rafbm
rafbm / clean-markup-line-numbers.html
Created March 27, 2011 22:23
<table>-free way to display <pre> line numbers that don’t mess up the clipboard.
<html>
<head>
<meta charset="utf-8">
<title>Clean-Markup Line Numbers™</title>
<style>
body {
width: 800px;
margin: 0 auto;
}