Skip to content

Instantly share code, notes, and snippets.

View perfectfoolish's full-sized avatar
🎯
Focusing

Fulei Li perfectfoolish

🎯
Focusing
View GitHub Profile
PUBLIC_IP="$(ifconfig eth0 | awk -F ' *|:' '/inet addr/{print $4}')"
@perfectfoolish
perfectfoolish / InstallOracleJava8JDK.sh
Last active September 8, 2017 19:51
Oracle Java 8 JDK Downloads Page: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Notice: Use the md5sum command line utility on Linux to verify the integrity of the downloaded file. Java SE Binaries Checksum: https://www.oracle.com/webfolder/s/digest/8u40checksum.html
# How To Install Java on CentOS and Fedora
# https://www.digitalocean.com/community/tutorials/how-to-install-java-on-centos-and-fedora
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-x64.tar.gz"
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-x64.rpm"
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
@perfectfoolish
perfectfoolish / zabbix_server.spec
Created March 19, 2015 05:59
# yum install -y gcc make mysql-devel net-snmp-devel curl-devel
%define path /usr/local/zabbix
%define real_name zabbix
Name:zabbix_server-ThoughtWorks
Version:2.2.3
Release:1.centos
Summary:zabbix_server for ThoughtWorks
Group:System Environment/Daemons
License:GPL
@perfectfoolish
perfectfoolish / rpmbuild_dir.sh
Last active August 29, 2015 14:17
Build the source code to RPM, # rpm -ivh zabbix .centos.src.rpm, # rpmbuild -ba rpmbuild/SPECS/zabbix_server.spec
#! /usr/bin/env bash
yum install -y rpm-build
yum install -y tree
mkdir -p rpmbuild/BUILD rpmbuild/BUILDROOT rpmbuild/RPMS rpmbuild/SOURCES rpmbuild/SPECS rpmbuild/SRPMS
echo "######"
tree rpmbuild
The ALLUSERS=1 switch worked. How do you know these things? :-)
I have no experience with installers. I searched Google, but I think I didn't even know what I needed to be searching for. Thanks for the help.
Don Jones · July 10, 2014 at 9:33 am #16975
Don Jones
Keymaster
install: "--no-rdoc --no-ri"
update: "--no-rdoc --no-ri"
[alias]
unstage = reset HEAD
throw = reset --hard HEAD
throwh = reset --hard HEAD^
st = status
ci = commit -v
co = checkout
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
[color]
syntax on
" space
set expandtab
set tabstop=2
set shiftwidth=2
" EOL whitespace
set list
set listchars=trail:+