Skip to content

Instantly share code, notes, and snippets.

View liyang85's full-sized avatar

Yang Li liyang85

View GitHub Profile
@liyang85
liyang85 / httpd init.d script.sh
Created December 3, 2017 14:29
For compiled httpd and can work on CentOS 6.
#!/bin/bash
#
# httpd Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: The Apache HTTP Server is an efficient and extensible \
# server implementing the current HTTP standards.
# processname: httpd
# config: /app/httpd22/conf
# config: /etc/sysconfig/httpd
#!/bin/bash
# vim: set fdm=marker:
#
#===== ===== ===== ===== ===== ===== ===== ===== ===== ===== ===== =====
# Filename: auto_compile_lamp_by_liyang.sh
# Description:
# Date: 2018-02-14
# Author: Li Yang
# Website: https://liyang85.com
#===== ===== ===== ===== ===== ===== ===== ===== ===== ===== ===== =====
@liyang85
liyang85 / set_env_after_centos_minimal_installation.sh
Created April 20, 2018 08:02
在虚拟机中最小化安装CentOS之后,配置网络、关闭SELinux和防火墙、配置EPEL仓库、安装常用软件、下载dotfiles。 https://github.com/liyang85/scripts-during-mage-linux-training/blob/master/01_improving/set_env_after_centos_mini_install_by_liyang.sh
#!/bin/bash
#
#===== ===== ===== ===== ===== ===== ===== ===== ===== ===== ===== =====
# Filename: set_env_after_centos_mini_install_by_liyang.sh
# Description:
# Date: 2018-01-07
# Author: Li Yang
# Website: https://liyang85.com
#===== ===== ===== ===== ===== ===== ===== ===== ===== ===== ===== =====
@liyang85
liyang85 / Great tutorials for git
Last active November 5, 2019 03:27
Git snippets
https://githowto.com/
@liyang85
liyang85 / pyenv_build_python.sh
Last active July 31, 2020 08:34
There is a more simple method than modifying build script, which is at the bottom of this gist. pyenv's built-in `python-build` script doesn't support Tk, so we have to modify it. (According to https://github.com/pyenv/pyenv/issues/1375#issuecomment-524280004)
#!/usr/bin/env bash
#
# Usage: python-build [-kpv] <definition> <prefix>
# python-build --definitions
# python-build --version
#
# -k/--keep Do not remove source tree after installation
# -p/--patch Apply a patch from stdin before building
# -v/--verbose Verbose mode: print compilation status to stdout
# -4/--ipv4 Resolve names to IPv4 addresses only
@liyang85
liyang85 / ChromeAppDownloader.py
Last active August 12, 2020 05:45 — forked from arulrajnet/ChromeAppDownloader.py
Python 2 script to download the Chrome Extensions (CRX) file directly from the google chrome web store.
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Python Script to download the Chrome Extensions (CRX) file directly from the Google Chrome Web Store.
Referred from http://chrome-extension-downloader.com/how-does-it-work.php
"""
from __future__ import division
import argparse