See my working application (and additional notes) here:
https://github.com/integralist/simple-rpm
Other information that led to the above repository, can be found below
| # use for WordPress Plugin: Show Useragent | |
| # https://github.com/hzlzh/Show-Useragent | |
| wget http://files.firestats.cc/ip2c/ip2c-2.0.0.zip | |
| unzip ip2c-2.0.0.zip | |
| cd ip2c | |
| wget http://software77.net/geo-ip/?DL=1 -O IpToCountry.csv.gz | |
| gunzip IpToCountry.csv.gz | |
| java -jar ip2c.jar -c IpToCountry.csv IpToCountry.bin | |
| ls -sSh |
| if ($request_uri = /) { | |
| set $test A; | |
| } | |
| if ($host ~* teambox.com) { | |
| set $test "${test}B"; | |
| } | |
| if ($http_cookie !~* "auth_token") { | |
| set $test "${test}C"; |
| /** | |
| * Laod large image at last. | |
| * requires jQuery | |
| * @author: takien | |
| */ | |
| jQuery(document).ready(function($){ | |
| $('img').each(function(){ | |
| var hires = $(this).data().src; | |
| if((hires != undefined) && (hires != '')){ | |
| $(this).attr('src',hires); |
| /** | |
| * SVG compare | |
| */ | |
| svg { | |
| width: 16px; | |
| height: 16px; | |
| } |
| FILE SPACING: | |
| # double space a file | |
| sed G | |
| # double space a file which already has blank lines in it. Output file | |
| # should contain no more than one blank line between lines of text. | |
| sed '/^$/d;G' |
| # Add the following 'help' target to your Makefile | |
| # And add help text after each target name starting with '\#\#' | |
| help: ## Show this help. | |
| @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
| # Everything below is an example | |
| target00: ## This message will show up when typing 'make help' | |
| @echo does nothing |
| function count_redir { | |
| curl -L -I -D - -o /dev/null $1 | awk 'BEGIN { redir = 0; status = 200; } tolower($1) ~ /http/ { redir=redir+1; status=$2 } tolower($1) ~ /location:/ { print redir, status, $2 } END { print "Completed, with ", redir-1, "redirects. Final result: ", status }' | |
| } |
| https://www.gnu.org/licenses/gpl-3.0.en.html | |
| GNU GENERAL PUBLIC LICENSE v3 |
| #!/bin/bash -e | |
| clear | |
| echo "============================================" | |
| echo "WordPress Install Script" | |
| echo "============================================" | |
| echo "Do you need to setup new MySQL database? (y/n)" | |
| read -e setupmysql | |
| if [ "$setupmysql" == y ] ; then | |
| echo "MySQL Admin User: " | |
| read -e mysqluser |
See my working application (and additional notes) here:
https://github.com/integralist/simple-rpm
Other information that led to the above repository, can be found below