Skip to content

Instantly share code, notes, and snippets.

@liziwl
liziwl / docker-compose.yaml
Created February 1, 2022 06:09 — forked from dnno/docker-compose.yaml
Docker-compose setup for Vaultwarden
version: '3'
services:
bitwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
- WEBSOCKET_ENABLED=true
- SIGNUPS_ALLOWED=false
@liziwl
liziwl / bvtest.py
Created March 24, 2020 03:07 — forked from abc1763613206/bvtest.py
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
@liziwl
liziwl / ros_odometry_publisher_example.py
Created April 24, 2018 07:56 — forked from atotto/ros_odometry_publisher_example.py
Publishing Odometry Information over ROS (python)
#!/usr/bin/env python
import math
from math import sin, cos, pi
import rospy
import tf
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3
@liziwl
liziwl / install-google-chrome.md
Created March 14, 2018 03:42 — forked from smmoosavi/install-google-chrome.md
Ubuntu 14.04 installing google chrome

When you got this error

$ sudo dpkg -i google-chrome-stable_current_amd64.deb 
sudo: unable to resolve host bayanca05
[sudo] password for bayan-ca-05: 
Selecting previously unselected package google-chrome-stable.
(Reading database ... 174654 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (43.0.2357.81-1) ...

Python Socket 编程详细介绍

Python 提供了两个基本的 socket 模块:

  • Socket 它提供了标准的BSD Socket API。
  • SocketServer 它提供了服务器重心,可以简化网络服务器的开发。

下面讲解下 Socket模块功能。

Socket 类型

@liziwl
liziwl / mysql2sqlite.sh
Created September 27, 2017 02:59 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@liziwl
liziwl / git 设置和取消代理
Last active January 4, 2019 03:01 — forked from myfreeer/git 设置和取消代理
git proxy 设置
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy http://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy