Skip to content

Instantly share code, notes, and snippets.

@aka863
aka863 / ca.md
Created December 10, 2024 06:07 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@aka863
aka863 / csv-to-shapefile-geopandas.py
Created November 25, 2023 09:47 — forked from nygeog/csv-to-shapefile-geopandas.py
Read a CSV with Pandas and set as GeoDataFrame with geopandas and save as Shapefile with fiona
import pandas as pd
from geopandas import GeoDataFrame
from shapely.geometry import Point
import fiona
df = pd.read_csv('data.csv')
geometry = [Point(xy) for xy in zip(df.x, df.y)]
crs = {'init': 'epsg:2263'} #http://www.spatialreference.org/ref/epsg/2263/
geo_df = GeoDataFrame(df, crs=crs, geometry=geometry)
@aka863
aka863 / clash-config.yaml
Created October 19, 2023 05:36 — forked from xqm32/clash-config.yaml
clash config with proxy-providers and rule-providers
##### 使用说明 #####
# 1. 请填写 proxy-providers - subscribe - url 为订阅链接
# 2. 下载 https://github.com/Loyalsoldier/clash-rules/archive/refs/heads/release.zip 并解压至 ./profiles/ruleset 文件夹下
# 3. 若需要自动更新 ruleset, 请编辑 rule-providers 下各项 type 为 http
##### 参考链接 #####
# 1. clash 样例配置文件
# https://lancellc.gitbook.io/clash/clash-config-file/an-example-configuration-file
# 2. clash 规则集
# https://github.com/Loyalsoldier/clash-rules
@aka863
aka863 / sendmail.py
Created July 21, 2023 08:41 — forked from changkun/sendmail.py
Python Email Sender for QQ Mail
from email.mime.text import MIMEText
from email.header import Header
from smtplib import SMTP_SSL
# qq mail sending server
host_server = 'smtp.qq.com'
sender_mail = 'SENDER_MAIL'
sender_passcode = 'PASS_CODE'
# receiver mail
@aka863
aka863 / .vimrc
Created May 10, 2022 03:05 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@aka863
aka863 / .vimrc
Created May 4, 2022 08:53 — forked from mendeza/.vimrc
Simple .vimrc or init.vim for nvim (neovim)
" (N)Vim Configuration File
" vim : place in $HOME/.vimrc
" nvim : place in $HOME/.config/nvim/init.vim
" $ ln -s $HOME/.config/nvim/init.vim $HOME/.vimrc
" General settings
" https://learnvimscriptthehardway.stevelosh.com/
" ---------------------------------------------------------------------------
" drop vi support - kept for vim compatibility but not needed for nvim
" Probably not needed with Vim 8+
"set nocompatible
@aka863
aka863 / index.html
Created October 20, 2021 16:25 — forked from danswick/index.html
save from leaflet draw
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Demo</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<!--Add mapbox.js -->
@aka863
aka863 / ogrtools.sh
Created January 13, 2021 14:00 — forked from AlexArcPy/ogrtools.sh
Using bash to run OGR command line tools
echo "Working directory: $PWD";
echo "List files in a given directory"
for file in C:/GISData/*; do
echo $file;
done
echo "Get basic info about all shapefiles in a given folder"
for file in C:/GISData/*; do
if [[ ${file: -4} == ".shp" ]]

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 <session_name>
@aka863
aka863 / ContextCmder-Disable.reg
Created July 4, 2018 06:53 — forked from jojobyte/ContextCmder-Disable.reg
Cmder Context (Right-Click) Menu for Windows 7/8
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]