This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while IFS='' read -r line || [[ -n "$line" ]]; do echo "$line";grep "$line" content.txt; done < filter_words_content.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $1 - tomcat port, $2 - tomcat folder to be replaced, $3 - tomcat folder replace with. | |
nginx_disable_tomcat() | |
{ | |
ssh -t bmb@$SERVER "cd $REMOTE_NGINX_DIR; git checkout baomingba.conf; "\ | |
"sed -i -E 's/(server\s127.0.0.1:$1)/#\1/' baomingba.conf; "\ | |
"sed -i -E 's/$2/$3/g' baomingba.conf; "\ | |
"echo $PWD | sudo -S nginx -t && sudo service nginx reload" | |
check_error "Error: disconnect nginx to tomcat with port $1." | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import subprocess | |
import sys | |
import tempfile | |
import shutil | |
import os | |
import errno | |
# variables for checkstyle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE module PUBLIC | |
"-//Puppy Crawl//DTD Check Configuration 1.3//EN" | |
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | |
<!-- | |
Checkstyle configurartion that checks the Google coding conventions from: | |
- Google Java Style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ /dl/.*\.(jpg|png)$ { | |
proxy_pass http://test.51bmb.com; | |
proxy_hide_header Content-Type; | |
rewrite ^/(.*)/dl/(.*)$ /$1/$2 break; | |
root /mnt/data/bmbtest; | |
add_header Content-Type application/octet-stream; | |
add_header Content-Disposition "attachment;filename=qrcode.png"; | |
expires 30d; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cd platforms/ios | |
plugins_path=baomingba/Plugins/ | |
add_plugin() { | |
find "$plugins_path$1" -name "*.[mh]*" -exec thor xcs:add {} Plugins \; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="Cache-Control" content="no-cache" /> | |
<meta http-equiv="Pragma" content="no-cache" /> | |
<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Wang Jinde | |
# Modify YUI_PATH with the path to the yuicompressor jar file | |
YUI_PATH="/opt/yui/yuicompressor-2.4.8.jar" | |
usage() | |
{ | |
echo "usage: `basename "$0"` css/js outer_file source_files" | |
echo "I.E." |
NewerOlder