一、使用RequireJS的压缩合并
使用RequireJS模块化后代码被拆分成多个JS文件了,在部署生产环境需要压缩合并,RequireJS提供了一个打包压缩工具r.js来对模块进行合并压缩。r.js非常强大,不但可以压缩js,css,甚至可以对整个项目进行打包。
r.js的压缩工具使用Ugl.....
分类:
编程语言 时间:
2014-05-14 02:27:30
阅读次数:
357
CentOS默认是不支持Ext4.所以你需要处理一下才行。使用环境使用的是CentOS5.8
内核是 2.6.18-238.19.1.el5其实CentOS 5.8 里面是有 ext4 模块的,只是没加载,所以我们先把模块加入系统# cd
/lib/modules/2.6.18-238.19.1.e...
分类:
其他好文 时间:
2014-05-14 01:36:14
阅读次数:
310
借用小甲鱼的经典:各位互联网的广大网友们、大家早上中午晚上好、、(打下小广告,因为小甲鱼的视频真的很不错)、每次看小甲鱼的视频自学都是比较轻松愉快的、、我在想,如果小甲鱼出STM32的视频,我会一集不漏的听的、哈、好了、、学习到了STM32的DMA模块、、琢磨了一下中文参考手册,官方是这样描述...
分类:
其他好文 时间:
2014-05-14 00:27:41
阅读次数:
358
请注明转载地址:http://www.cnblogs.com/arhat
在上一章中呢,我们基本上搭建好了环境,那么本章我们就从基础模块开始写起。由于用户,角色,动作三个当中,都是依赖与动作的,所以本章我们从动作开始做起,先把这个基础模块建立起来,然后才能把用户,角色和动作关联起来形成权限。
首先建...
分类:
Web程序 时间:
2014-05-13 21:56:35
阅读次数:
469
#!/usr/bin/envpython#coding:utf8fromoptparseimportOptionParserimportsys,os#parser=OptionParser()defset():parser=OptionParser("Usage:%prog[file1][file2]...")parser.add_option("-c","--chars",dest="characters",action="store_true",default=False,help="onlycountc..
分类:
编程语言 时间:
2014-05-13 04:31:41
阅读次数:
488
#!/usr/bin/envpython#coding:utf8#此脚本为查找递归目录下所有文件匹配的内容importos,sys,tabdefpaths(path):list_path=os.walk(path)all_file=[]forp,d,flinlist_path:forfinfl:pfile=os.path.join(p,f)ifos.path.isdir(pfile):paths(pfile)all_file.append(pfile)returnall..
分类:
编程语言 时间:
2014-05-13 03:49:34
阅读次数:
426
#!/usr/bin/envpython#coding:utf8importsmtplib,sysfromemail.mime.textimportMIMETextfromconfig.mailssimportmail_list,contentdefsend_mail():mail_host,mail_user,mail_pass,mail_postfix,sub,me,mailto_list=mail_listme=mail_user+"<"+mail_user+"@"+mail_postfix+"&..
分类:
编程语言 时间:
2014-05-13 02:40:50
阅读次数:
503
#!/usr/bin/envpython#coding:utf8importos,sysimportdatetime,shutil,subprocessfromconfig.configimportslow_configclasscut_mysql(object):mysql_user,mysql_pass,date_day,slow_log_name,slow_log_path,mysqlsla_log_name,mysqldumpslow_log_name,new_log_path,new_log_nam..
分类:
数据库 时间:
2014-05-13 02:39:47
阅读次数:
482
#!/usr/bin/envpython#coding:utf8importos,sysimportmd5,tabfrommysql_co.my_dbimportset_mysqlfromssh_co.ssh_connectimportsshdfromssh_co.cfg.configimportssh_message,item_pathfromfileimportfindfiledefmy_mysql():db_file={}my_connect=set_mysql()f_file=findfile.mai..
分类:
编程语言 时间:
2014-05-13 01:44:22
阅读次数:
449
#!/usr/bin/envpython#coding:utf8#随机生成自定义长度密码fromrandomimportchoiceimportstring,pickledefGenPassword(length=8,chars=string.ascii_letters+string.digits):return‘‘.join([choice(chars)foriinrange(length)])defpasslist(r_user,c_user,ip_list,web_list):di..
分类:
编程语言 时间:
2014-05-13 01:25:56
阅读次数:
505