Skip to content

Instantly share code, notes, and snippets.

@xuyang2
xuyang2 / python_custom_openssl.diff
Created August 28, 2023 01:18 — forked from eddy-geek/ python_custom_openssl.diff
Compile python with statically linked openssl
--- a/setup.py 2014-03-17 03:31:31.000000000 +0100
+++ b/setup.py 2014-03-17 19:06:03.000000000 +0100
@@ -750,10 +750,8 @@
exts.append( Extension('_socket', ['socketmodule.c'],
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
- search_for_ssl_incs_in = [
- '/usr/local/ssl/include',
- '/usr/contrib/ssl/include/'
- ]
@xuyang2
xuyang2 / build.sh
Created June 15, 2023 02:05 — forked from bobbytables/build.sh
Protocol Buffer build script for multiple folders
#!/usr/bin/env bash
# This script is meant to build and compile every protocolbuffer for each
# service declared in this repository (as defined by sub-directories).
# It compiles using docker containers based on Namely's protoc image
# seen here: https://github.com/namely/docker-protoc
set -e
REPOPATH=${REPOPATH-/opt/protolangs}
CURRENT_BRANCH=${CIRCLE_BRANCH-"branch-not-available"}
@xuyang2
xuyang2 / ext.txt
Created June 15, 2022 03:29 — forked from chronon/ext.txt
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@xuyang2
xuyang2 / delete_git_submodule.md
Created June 8, 2022 02:57 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
glibc rhel centos sle debian ubuntu kylin manylinux
2021/2/1 2.33 21.04 hirsute
2.32 20.10 groovy
2020/2/1 2.31 11 bullseye 20.04 LTS focal
2.30 19.10 eoan
2.29 19.04 disco
2018/8/1 2.28 8.3 Ootpa 8.2.2004 10 buster 18.10 cosmic V10 Tercel
2018/2/1 2.27
@xuyang2
xuyang2 / repo-rinse.sh
Created May 28, 2021 11:50 — forked from nicktoumpelis/repo-rinse.sh
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive

Download CMake from: https://cmake.org/download/

wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz

Compile from source and install

tar zxvf cmake-3.*
@xuyang2
xuyang2 / python27_on_centos65.md
Created May 17, 2021 01:57 — forked from dalegaspi/python27_on_centos65.md
Installing Python 2.7 on CentOS 6.5

Installing Python 2.7 on Centos 6.5

Centos 6.* comes with Python 2.6, but we can't just replace it with v2.7 because it's used by the OS internally (apparently) so you will need to install v2.7 (or 3.x, for that matter) along with it. Fortunately, CentOS made this quite painless with their Software Collections Repository

sudo yum update # update yum
sudo yum install centos-release-scl # install SCL 
sudo yum install python27 # install Python 2.7

To use it, you essentially spawn another shell (or script) while enabling the newer version of Python:

@xuyang2
xuyang2 / Linux Static IP
Created April 14, 2021 03:32 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@xuyang2
xuyang2 / GitConfigHttpProxy.md
Created March 4, 2021 09:20 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like: