history

nginx: send all requests to a single html page

自闭症网瘾萝莉.ら 提交于 2019-11-27 06:01:20
Using nginx, I want to preserve the url, but actually load the same page no matter what. I will use the url with History.getState() to route the requests in my javascript app. It seems like it should be a simple thing to do? location / { rewrite (.*) base.html break; } works, but redirects the url? I still need the url, I just want to always use the same page. Alex Howansky I think this will do it for you: location / { try_files /base.html =404; } Using just try_files didn't work for me - it caused a rewrite or internal redirection cycle error in my logs. The Nginx docs had some additional

Why might git log not show history for a moved file, and what can I do about it?

久未见 提交于 2019-11-27 05:20:41
问题 I've renamed a couple of files using git mv , used git stash , had a quick look at HEAD (without changing it) then did git stash pop to get the whole lot back again. My moves had disappeared from the commit list, so I redid them with git rm and the commit message claimed git had spotted the rename was a rename. So I thought no more of it. But now, post-commit, I can't get at the history of the moved files! Here's what git says about the commit in question: ~/projects% git log --summary commit

Can tags be automatically moved after a git filter-branch and rebase?

风格不统一 提交于 2019-11-27 04:50:47
edit The question boils down to "Can git rebase be instructed to rebase tags, too?" But an answer to the original question would also help. Asking How to prepend the past to a git repository? I followed these instructions . < edit >Then I rebased to include a file that was only in the snapshots, see here .< /edit > Since history was rewritten (by git filter-branch or git rebase or both?) all tags are still on the original time line* and I'd somehow like to move them to the new one. I think I made all commit-messages with tags unique so I could try writing a script that uses them, but a more

Historical reason behind different line ending at different platforms

谁说我不能喝 提交于 2019-11-27 04:35:55
Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix? And now that Mac OS X is Unix (-like), did Apple switch to \n from \r? DOS inherited CR-LF line endings (what you're calling \r\n, just making the ascii characters explicit) from CP/M. CP/M inherited it from the various DEC operating systems which influenced CP/M designer Gary Kildall. CR-LF was used so that the teletype machines would return the print head to the left margin (CR = carriage return), and then move to the next line (LF = line feed). The

Why are x86 registers named the way they are?

青春壹個敷衍的年華 提交于 2019-11-27 02:34:07
问题 For example, the accumulator is named EAX and, while the instruction pointer is called IP . I also know that there are bytes called CL and DH . I know there must be a convention to all of the names, but what is it? 回答1: The C and the D are numbers/types and H for high and L for low parts of the higher register. http://en.wikipedia.org/wiki/X86 Wikipedia explains it very well. More from the Wikipedia: AX/EAX/RAX: accumulator BX/EBX/RBX: base CX/ECX/RCX: counter DX/EDX/RDX: data/general 回答2:

React躬行记(13)——React Router

余生长醉 提交于 2019-11-27 02:20:03
  在网络工程中,路由能保证信息从源地址传输到正确地目的地址,避免在互联网中迷失方向。而前端应用中的路由,其功能与之类似,也是保证信息的准确性,只不过来源变成URL,目的地变成HTML页面。   在传统的前端应用中,每个HTML页面都会对应一条URL地址,当访问某个页面时,会先请求服务器,然后服务器根据发送过来的URL做出处理,再把响应内容回传给浏览器,最终渲染整个页面。这是典型的多页面应用的访问过程,由服务器控制页面的路由,而其中最令人诟病的是整页刷新,不仅存在着资源的浪费(像导航栏、侧边栏等通用部分不需要每次加载),并且让用户体验也变得不再流畅。   为了弥补多页面应用的不足,有人提出了另一种网站模型:单页面应用(Single Page Application,简称SPA)。SPA类似于一个桌面应用程序,能根据URL分配控制器(即由JavaScript负责路由),动态加载适当的内容到页面中,减少与服务器之间的通信次数,不再因为页面切换而打断用户体验。虽然名称中包含“单页”两字,但浏览器中的URL地址还是会发生改变,在视觉上与多页面保持同步。而实现SPA的关键就是路由系统,在React的技术栈中,官方给出了支持的路由库:React Router,后文将会着重分析该库。   当然,SPA也存在着自身的缺陷,例如不利于SEO、增加开发成本等,使用与否还是得看具体项目。 一、版本  

linux中,history命令,显示时间戳?操作人?IP地址?

[亡魂溺海] 提交于 2019-11-27 02:19:40
需求描述 : 在linux环境中,有的时候为了审计的需要,要记录谁什么时间从什么IP登录,执行了什么命令,bash的history命令就能够记录这些信息,但是在默认的情况下,是不记录时间的,所以呢,在这里记录下,对其进行改造。 操作过程 : 1.默认的history命令,只是显示行号,执行的命令 [root@testvm01 ~]# history | more 3 ./test.sh 4 ls 5 vi nmon16e_x86_rhel65 6 cdd /opt 7 ls 8 cd /opt 9 ls 10 cd softwares/ 11 ls 12 cd ../app/ 13 ls 14 cd test01/ 备注:这样,就可以看到命令执行的历史,但是,看不到什么时间执行的,谁执行的。 2.使用HISTTIMEFORMAT变量来指定命令中增加时间戳 [root@testvm01 ~]# export HISTTIMEFORMAT="%F %T " #注意: 在调用history命令时,行号 然后是HISTTIMEFORMAT的执行结果,然后是命令,注意%T后面有空格。 [root@testvm01 ~]# history | more 5 2019-03-13 14:41:55 vi nmon16e_x86_rhel65 6 2019-03-13 14:41:55 cdd

Linux history时间用户ip设置

China☆狼群 提交于 2019-11-27 02:19:30
Linux history时间用户ip设置 在使用linux服务器的时候发生一些不知道谁操作的问题,google一下说history命令可以查看到历史记录,用过之后发现还是不够详细,再google,原来可以自己设置history的显示。 1.用vi编辑器打开/etc/profile 2.最后加两句代码 USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'` export HISTTIMEFORMAT="[%F %T][`whoami`][${USER_IP}] " 3.source /etc/profile 4.执行history 显示如下: 1000 [2012-09-08 04:05:09][root][192.168.10.136] history 1001 [2012-09-08 04:14:24][root][192.168.10.136] cd root 1002 [2012-09-08 04:14:27][root][192.168.10.136] ls 1003 [2012-09-08 04:14:30][root][192.168.10.136] cd /opt 来源: http://www.cnblogs.com/carbon3/p/5613790.html

Linux 配置 history 命令显示操作时间、用户和登录 IP

不问归期 提交于 2019-11-27 02:19:00
一、在配置文件中(/etc/bashrc 或者 /etc/profile 或者~/.bash_profile 或者 ~/.bashrc)添加如下配置 #vim /etc/bashrc // 进到这个里面之后,再在最后加上下面这一段即可。 HISTFILESIZE=4000 #默认保存命令是1000条,这里修改为4000条 HISTSIZE=4000 USER_IP=`who -u am i 2>/dev/null| awk '{print $NF}'|sed -e 's/[()]//g'` #取得登录客户端的IP if [ -z $USER_IP ] then USER_IP=`hostname` fi HISTTIMEFORMAT="%F %T $USER_IP:`whoami` " #设置新的显示history的格式 export HISTTIMEFORMAT 二、加载配置 [root@linux-node ~]# source /etc/bashrc 三、最终显示效果如下 # history --------------------- 作者:幸福丶如此 来源:CSDN 原文:https://blog.csdn.net/m0_37886429/article/details/78520434 版权声明:本文为博主原创文章,转载请附上博文链接! 来源: https://www

_Underscores in Function Names

假装没事ソ 提交于 2019-11-27 02:11:39
问题 In a lot of languages with simple OO capability (PHP 4), or misunderstood OO capabilities (Javascript, C using function pointers, etc.), you'll end up with a function naming convention that uses leading underscores to to indicate privilege level. //ex. function _myPrivateFunction(){ } While individual teams are always going to come up with their own naming conventions like this, the underscore convention seems so prevalent that it made me curious about Where the technique first came from If