Skip to content

Instantly share code, notes, and snippets.

[Unit]
Description=Wireguard Proxy Server
After=multi-user.target
[Service]
ExecStart=+/usr/local/bin/wg-proxy -confPath /etc/wg-proxy/config.json
CapabilityBoundingSet=CAP_NET_ADMIN
AmbientCapabilities=CAP_NET_ADMIN
Type=simple
@lsgrep
lsgrep / LLM.md
Created March 29, 2023 03:11 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@lsgrep
lsgrep / docker.md
Last active March 15, 2023 05:02
Docker & Docker-compose Setup
  1. Docker setup
wget -qO- https://get.docker.com/ | sh
  1. sudoless access
sudo usermod -aG docker $USER

logout & login again

@lsgrep
lsgrep / pom.md
Created March 9, 2021 03:51
Hive download jars

Download maven dependencies into a folder mvn install dependency:copy-dependencies

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <repositories>
        <repository>
            <id>cloudera</id>
            <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
@lsgrep
lsgrep / Tensorflow 1-2.md
Created October 20, 2019 11:44
Tensorflow 1-2.md

Tensorflow 1.0 vs Tensorflow 2.0

Tensorflow 1.0 in general is not famed for its ease of use, nor for being well documented. Tensorflow 2.0 has set out to fix all those issues, and it does make things easier with advent of eager execution and unified RNNs & unified Optimizers etc. There are a lot to take in version 2.0, but without proper context and comparison to the 1.0 version, some features are beyond magical. I will provide proper explanation and context through this blog.

Tensorflow 1.0 Programming model

  • Graph
@lsgrep
lsgrep / readme.md
Last active September 25, 2019 15:29

whoami

I have been developing backend applications for the last few years. After reading Hackers & Painters I was captivated by the Lisp, to this day still am. And under the influence of Paul and Hacker News, I picked up Clojure, a Lisp on JVM. Not only because Lisp is an elegant, beautiful language, it is also one of the few languages that involved in the creation of the Artificial Intelligence. Alas, I never had the chance to use Lisp or other languages to build intelligent applications professionally.

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
# Uncomment the next line to enable packet forwarding for IPv6
# Enabling this option disables Stateless Address Autoconfiguration
# based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1
net.ipv4.conf.all.proxy_arp = 1
net.core.netdev_max_backlog = 250000
@lsgrep
lsgrep / Makefile
Created October 12, 2017 02:56 — forked from mcastilho/Makefile
Makefile for Medium article
.PHONY: all tags clean test build install generate image release
REGISTRY_REPO = <..redacted..>
OK_COLOR=\033[32;01m
NO_COLOR=\033[0m
ERROR_COLOR=\033[31;01m
WARN_COLOR=\033[33;01m
# Build Flags
@lsgrep
lsgrep / kubectl.fish
Created October 10, 2017 09:31 — forked from terlar/kubectl.fish
Kubernetes fish completions
# kubernetes - is an open source system for managing containerized
# applications across multiple hosts, providing basic mechanisms for
# deployment, maintenance, and scaling of applications.
# See: https://kubernetes.io
function __kubectl_no_command
set -l cmd (commandline -poc)
if not set -q cmd[2]
return 0
end
@lsgrep
lsgrep / import_zone.py
Created August 15, 2017 03:12 — forked from onlytiancai/import_zone.py
从zonefile文件把域名记录导入到DNSPod
# -*- coding: utf-8 -*-
'''
功能:
从zonefile文件导入域名到Dnspod
requirements:
dnspython==1.10.0
requests==1.0.4
'''