自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(60)
  • 收藏
  • 关注

原创 使用python读取tensorflow实例中的MNIST模拟数据

1, 从这里下载模拟的数据 http://yann.lecun.com/exdb/mnist/tensorflow实例中的数据也是来自于http://yann.lecun.com/exdb/mnist/所以直接下载如下4个数据就OK。train-images-idx3-ubyte.gz:  training set images (9912422 bytes) tr

2016-10-21 16:06:38 1634

原创 在postfix使用qq企业邮箱的smtp

在/etc/postfix/main.cf中添加如下信息smtpd_tls_cert_file=/etc/ssl/certs/your.crtsmtpd_tls_key_file=/etc/ssl/private/your.keysmtpd_tls_CAfile=/etc/ssl/certs/your-chaint.crtsmtpd_use_tls=yessmtpd_tls_sess

2016-10-17 14:51:07 3655

原创 启动docker内部的apache2服务并从外部访问

执行需要执行的docker image$ docker run -i -t -p 8080:80 alex20160831/ubuntu /bin/bash在docker的容器内,启动apache2$ sudo service apache2 startcontainer内部访问web服务$ curl http://localhost执行如下命令从c

2016-10-11 17:35:32 5776

转载 使用vlc下载u3m8流媒体并存储为文件

http://superuser.com/questions/156474/how-to-record-a-mp3-m3u-stream-using-vlcThese instructions show how to capture/record directly from a MP3/M3U stream of a radio station, using VLC pla

2016-10-07 17:54:41 11237

原创 利用casperjs和tor来隐藏自己的ip地址

1, 首先在ubuntu上面安装tor详情可以参考 https://www.torproject.org/docs/debian.html.enYou need to add the following entry in /etc/apt/sources.list or a new file in /etc/apt/sources.list.d/:deb http:

2016-07-25 19:00:32 6439

转载 Node.js: managing child processes

http://krasimirtsonev.com/blog/article/Nodejs-managing-child-processes-starting-stopping-exec-spawnNode.js: managing child processes/ blog / NodejsThese days I spent some time working on

2016-07-04 17:30:22 387

原创 将spring的x-frame-option设置为无效的方法

2016-06-21 15:50:09 3523

原创 从git里面提取两个commit之间变更过的文件

git archive --format=zip HEAD `git diff --name-only 8bbf69c253801228ff504ab080ce7cf44a924971 a27d045d8c60d6c62a4061b94763886577e1c0eb` > a.zip

2016-03-30 15:00:56 4257

转载 让百度删除不想收录的域名或快照的最快方法

简介:个别网站可能会出现以下类似困扰:①、百度收录了自己不想收录的域名,造成内容重复,比如张戈博客,百度近一半的收录是www的域名,而且收录的内容还是重复的!实际上张戈博客的首选域名是不带www,就算一开始就做了 ...个别网站可能会出现以下类似困扰:①、百度收录了自己不想收录的域名,造成内容重复,比如张戈博客,百度近一半的收录是www的域名

2016-03-25 13:35:42 5105

原创 解决中文文件名显示乱码的问题

vi /etc/environment 添加如下LANG="en_US.UTF-8"LAGUAGE="en_US:en"LC_ALL="en_US.UTF-8"然后重新login

2016-02-08 17:28:52 2228

原创 在amazon ec2上部署spark cluster

1,利用spark自带的ec2脚本来生成spark在spark的安装目录下,执行如下命令$ ./ec2/spark-ec2 -k -i -s --vpc-id= --subnet-id= launch , where  is the name of your EC2 key pair (that you gave it when you created it),  i

2016-02-07 21:00:27 2080

原创 在ubuntu上安装zeppelin

1, 安装javasudo apt-get install default-jre修改java的home路径,这个在安装mysql jdbc的时候也会用到CLASSPATH=$CLASSPATH:/usr/share/java/mysql.jarexport CLASSPATH2, 安装可以参考这篇文章https://zeppelin.incuba

2016-02-06 16:51:43 1277

原创 使用activeMQ配置MQTT broker集群

主要是利用HAProxy作为负载均衡器,利用activeMQ作为broker的集群。1,准备4台服务器,默认操作系统为Ubuntu14.04,三台服务器安装activeMQ, 另外一台服务器安装HAProxy作为负载均衡。2,安装和配置activeMQ安装jresudo apt-get install default-jreexport JAVA_HOME=/usr/lib/jv

2015-09-02 13:14:16 8487 1

转载 How To Configure BIND as a Private Network DNS Server on Ubuntu 14.04

How To Configure BIND as a Private Network DNS Server on Ubuntu 14.04Tags: DNS, Networking, DigitalOcean Distribution: UbuntuTutorial SeriesThis tutorial is part 6 of 7 in the se

2015-08-20 21:22:52 1231

转载 7 Strace Examples to Debug the Execution of a Program in Linux

Strace is a debugging tool that will help you troubleshoot issues.Strace monitors the system calls and signals of a specific program. It is helpful when you do not have the source code and would l

2015-08-20 18:56:20 417

原创 using gdb to debug c program

#include static void display(int i, int *ptr);int main(void) { int x = 5; int *xptr = &x; printf("In main():\n"); printf(" x is %d and is stored at %p.\n", x, &x); printf(" xptr

2015-08-20 18:54:10 580

原创 在angularjs客户端压缩图片文件然后上传

主要是利用html5的canvas来进行图片的压缩,然后转化为dataURL,再有dataURL转化为Blob文件,Blob对象可以直接赋值给Formdata.app.service('Util', function($q) { var dataURItoBlob = function(dataURI) { // convert base64/URLEnc

2015-07-03 17:47:32 8593 5

原创 mongodb通过子串查询ObjectId对应的record

select the records from collections post, whose _id contains substring '031'db.post.find({$where: "/031/.test(this._id.str)"})

2015-06-30 12:32:28 769

原创 使用mongostat监视mongodb

1, 监视一个mongod mongostat 10.80.1.1:270181,监视replica setmongostat --host rs0/10.80.1.1:27018,10.80.1.2:27018,10.80.1.3:27018 --username youruser --password yourpassword --authenticationDatabas

2015-06-04 17:22:01 1779 2

原创 difference of top and left between Javascript and Jquery

1, top and left relative to the documentjquery .offset()Get the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to

2015-06-02 17:36:04 618

原创 在iphone上构建nodejs服务器

在iphone上构建nodejs服务器

2015-04-17 13:29:57 2600

转载 Apple Watch -- 作为游戏开发者的你准备好了么? (上)

http://inpla.net/thread-8145-1-1.htmlApple Watch -- 作为游戏开发者的你准备好了么? (上)对于去年(2014年)苹果的产品线来说,最具创新的或许应该算得上Apple Watch了,在此之前各个网站和分析师的猜测就已经漫天飞舞。 关注点无不外乎是在手表和iTV这两个产品上。 2014年9月9日上午10

2015-04-08 09:30:57 1924

原创 使用nodejs mongodb连接mongodb的shard分布服务

1,连接单个mongodb的实例,可以参看node mongodb的文档https://github.com/mongodb/node-mongodb-native2, 连接mongodb 的mongos服务,只需要修改一下连接配置即可,如下var MongoClient = require('mongodb').MongoClient , format = r

2015-03-25 12:26:22 1410

原创 使用MongoDb Extension for Yii 2连接mongodb分布式服务

1, 连接一般的mongodb,可以参考MongoDb Extension的文档,如下http://www.yiiframework.com/doc-2.0/ext-mongodb-index.html2, 连接mongodb分布式服务,只需要修改配置文件如下return [ //.... 'components' => [ 'mo

2015-03-25 12:13:15 5219 3

转载 Turning MongoDB Replica Set to a Sharded Cluster

Written by Severalnines on May 11, 2013origin: http://www.severalnines.com/blog/turning-mongodb-replica-set-sharded-clusterReplica Sets or Sharded Clusters?**

2015-03-24 15:25:45 884

原创 基于MongoDb创建NoSQL分布式的数据库

1,在Ubuntu上安装MongoDBsudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo

2015-03-24 12:44:41 2971

原创 如何使用wireshark查看ssl内容

1,要查看ssl的内容,需要得到server的server rsa key2, 打开wireshark, 找到如下路径, Edit -> Preferences -> protocols -> SSL然后点击 RSA Keys List: Edit,在新的RSA编辑界面创建一个新的RSA key其中IP address 是服务器的IPPort 一般是443protoco

2015-02-27 15:54:46 21470

转载 AngularJS + RequireJS

原文 http://www.startersquad.com/blog/angularjs-requirejs/AngularJS + RequireJSDmitry EvseevSeptember 19, 201313 CommentsWhile delivering software projects for startups, we’ve come t

2015-02-24 18:18:18 4383 2

原创 install nodejs on pcduino3

1, install nodejs, the same as raspberry pi wget http://node-arm.herokuapp.com/node_latest_armhf.deb sudo dpkg -i node_latest_armhf.deb2, install pcduino nodejs module, us

2014-11-30 01:23:35 947

原创 ssh to pcduino3 without monitor from ubuntu

LinuxNOTE: You should have the usbnet module available for your Linux kernel. On most distributions, this is the case by default. If this is not the case for your distribution, you will need to en

2014-11-29 23:10:16 659

原创 ios上的uiwebview只显示英文

之前利用phonegap开发ios上的程序,在点击 的时候,界面总是显示英文,Choose Existing File。为了显示中文或者日文,需要在info.plist里面添加一个Localizations的选项,然后在里面添加自己想要的语言,比如中文,英文,日文

2014-11-11 17:15:30 1907

原创 ubuntu启动s时出现错误: udevadm trigger is not permitted while udev is unconfigured.

1. Boot liveCD2. "sudo fdisk -l" to find your boot disk, in my case it is /dev/sda1.3. "sudo mkdir /media/newroot"4. "sudo mount /dev/sda1 /media/newroot", change sda1 to whatever your boot di

2014-11-10 19:36:00 2831

原创 在启动时自动执行linux上的一些程序

在启动时自动执行linux上的一些程序/etc/rc.local

2014-11-05 16:18:06 576

原创 intel edison with grove lcd

通过intel xdk,如下的程序可以打印Hello world到grove lcd上var mraa = require ('mraa');var LCD = require ('jsupm_i2clcd');console.log('Current version of MRAA is', mraa.getVersion());var light = new mraa.Aio(0);var lightValue;var lcdMessage=" ";var myLCD = ne

2014-10-31 08:21:14 2259

转载 ssh to intel edison

The factory software image for Edison has SSH access enabled only via the USB Gadget network interface (192.168.2.15).   Configuring the board with 'configure_edison --setup' prompts for a root pass

2014-10-30 19:11:20 1718

原创 从Ubuntu12.04升级到Ubuntu 14.04后系统不能启动

进入Ubuntu启动界面,一般有几个选项,Ubuntu,Ubuntu高级。。。输入e键,进入grub的设置界面,将里面的ro修改为rw即可。以上可以启动,暂时性的设置但是为了永久保存这个设置,需要进入Ubuntu里面,修改文件/boot/grub/grub.cfg将其中类似于下面的一行中的ro全部修改为rw即可root=UUID=70abcd30-1a53-4aff-a

2014-08-28 16:42:43 4324

原创 在ubuntu上使用uwsgi部署CherryPy的应用

在ubuntu上使用uwsgi部署CherryPy的应用

2014-08-21 11:24:04 1704

原创 ubuntu上NetBeans的Tab转换空格问题的解决方案

进入Netbeans里面,通过Options

2014-07-14 11:04:14 1508

原创 利用DNode实现php和nodejs之间的通信

利用DNode实现php和nodejs之间的通信

2014-05-21 16:33:48 7733

原创 ios push notifications using nodejs

1, create the proper SSL Certificate and Keys. please refer to the link from Aget pen from p12 file$ openssl pkcs12 -in CertificateName.p12 -out CertificateName.pem -nodestest connecti

2014-05-09 11:02:34 1340

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除