Skip to content

Instantly share code, notes, and snippets.

View itxx00's full-sized avatar
✈️
keep working

itxx00 itxx00

✈️
keep working
View GitHub Profile
@itxx00
itxx00 / tengine.spec
Created February 17, 2014 07:47
tengine.spec
#
%define tengine_home %{_localstatedir}/cache/tengine
%define tengine_user tengine
%define tengine_group tengine
Summary: Web server originated by Taobao
Name: tengine
Version: 2.0.0
Release: 0%{?dist}
Vendor: taobao inc.
@itxx00
itxx00 / gist:9466571
Created March 10, 2014 14:58
autofsck
#/bin/bash
#########################################
#Function: auto fdisk
#Usage: bash auto_fdisk.sh
#Author: Customer service department
#Company: Alibaba Cloud Computing
#Version: 2.0
#########################################
count=0
@itxx00
itxx00 / 1.sh
Last active August 29, 2015 14:00
discard-support
[root@localhost ~]$ rpm -q qemu-kvm
qemu-kvm-1.6.2-1.fc20.x86_64
[root@localhost ~]$ rpm -q libvirt-daemon
libvirt-daemon-1.1.3.4-4.fc20.x86_64
@itxx00
itxx00 / dns.sql
Created May 14, 2014 15:16
dns bind mysql
-- MySQL dump 10.13 Distrib 5.1.61, for redhat-linux-gnu (x86_64)
--
-- Host: localhost Database: dnsdata
-- ------------------------------------------------------
-- Server version 5.1.61
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
@itxx00
itxx00 / php.ini
Last active August 29, 2015 14:01
kb5
; 找到其中
disable_functions =
; 替换为
disable_functions = fsockopen,pfsockopen,chgrp,chown,chroot,closelog,dl,exec,ini_alter,ini_restore,openlog,passthru,popen,popepassthru,posix_kill,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,putenv,readlink,scandir,shell_exec,stream_socket_server,symlink,sys_getloadavg,syslog,system,virtual
@itxx00
itxx00 / 2-setenv.sh
Created June 4, 2014 15:49
zabbix tomcat
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false"
<?
/**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@itxx00
itxx00 / comjscss.py
Created July 24, 2014 06:06
a script for js/css compress
#!/usr/bin/env python
#coding:utf-8
'''Compress js and css file.
usage:
compjscss.py dir
will compress all css/js in dir and save to dir_min/
'''
import requests
@itxx00
itxx00 / hello.py
Created November 10, 2014 16:20
ansible hello world module
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, itxx00 <itxx00@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@itxx00
itxx00 / mysql_bench.sh
Created December 18, 2014 06:54
mysql_bench.sh
#!/bin/bash
#
sync && sync
case $1 in
select)
echo 3 > /proc/sys/vm/drop_caches
mysqlslap --no-defaults --concurrency=50 --engine=innodb --auto-generate-sql --auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=key --auto-generate-sql-write-number=100000 --number-of-queries=300000
echo 3 > /proc/sys/vm/drop_caches
;;
insert)