Skip to content

Instantly share code, notes, and snippets.

@jeremejazz
jeremejazz / installing_gdal.md
Last active May 6, 2024 12:13
Installing Gdal with Anaconda

Installing GDAL with Anaconda

Here are steps to install GDAL in Anaconda with python bindings.

  1. Download and Install Anaconda (or Miniconda for minimal setup) For Windows a shortcut to anaconda prompt will be created in the start menu which should open command prompt with conda activated. In Linux you will be asked to make conda automatically start whenever bash starts. You can also activate it manually.
  2. (Optional. You can skip this if you want to only use base) Create a Conda environment with python.
conda create -n geospatial python=3.9
@oschannel
oschannel / CHEATSHEET.md
Last active May 6, 2024 12:11
Running PostgreSQL server on Android Phone without rooting

This cheatsheet is for the following video that shows how to Install and Run the PostgreSQL Database server on your Andriod Phone. Watch this video for a complete Demo/Solution: https://youtu.be/7edutr-ALdc

Install Termux:

Once termux is installed open it and use the shell for below commands

  • Install PostgreSQL:

@omarmiatello
omarmiatello / EasyWS.kt
Last active May 6, 2024 12:08
First experiment with WebSocket and Kotlin Coroutine
import kotlinx.coroutines.experimental.CommonPool
import kotlinx.coroutines.experimental.channels.Channel
import kotlinx.coroutines.experimental.launch
import okhttp3.*
import okio.ByteString
import kotlin.coroutines.experimental.suspendCoroutine
/**
* Created by omarmiatello on 17/06/17.
*/

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@i-e-b
i-e-b / adler32.cs
Created September 18, 2017 14:30
Adler32 hash in C#
private static uint Adler32(string str)
{
const int mod = 65521;
uint a = 1, b = 0;
foreach (char c in str) {
a = (a + c) % mod;
b = (b + a) % mod;
}
return (b << 16) | a;
}
@loredanacirstea
loredanacirstea / PipeProxy.sol
Last active May 6, 2024 12:03
General proxy for calling external contract functions and returning their output. This is unsafe, work in progress.
pragma solidity ^0.4.24;
contract PipeProxy {
function proxy(
address _to,
bytes input_bytes,
uint256 gas_value
)
payable
@tanghaiduong
tanghaiduong / Show All Files And Folder Hidden By Virus
Created September 24, 2014 13:25
How To Show All Files And Folder Hidden By Virus Using Command Prompt In Windows 8, 7 and XP
1. Open Command Prompt (CMD) as an Administrator.
2. Navigate to the drive whose files are hidden and you want to recover.
3. Then Type attrib -s -h -r /s /d *.* and hit Enter.
4. That is it. Now you will get all the hidden files and folder as general files and you can use it.
@saper-2
saper-2 / README.md
Created January 5, 2024 17:59
Debian on HP T620 terminal - hints

Installation tips

I use only Debian and net-inst image to install linux, and I use text install 😄

  • When partitioning primary disk where will be Debian installed, create first partiton of size 256-512M as EFI System partition - this will set this partition as Bootable, and FileSystem=vfat .
  • Don't forget about swap partition if you have not much too much RAM (at least of size of RAM), I usually create 4-8GB as 2nd partition on disk.
  • You can optionally create partition for /boot that have about 1-2GB , FS=ext4,
  • Or just use whole disk as / , FileSystem=ext4 - I almost always choose this setup - it's the most optimal.