Skip to content

Instantly share code, notes, and snippets.

View Kuri-su's full-sized avatar
❄️
DeepIn && Focus

Kurisu_Amatist Kuri-su

❄️
DeepIn && Focus
View GitHub Profile
https://developer.github.com/v4/guides/migrating-from-rest/
@Kuri-su
Kuri-su / gist:e8257b411f52147a06dc270d2df51684
Created November 26, 2017 11:16 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@Kuri-su
Kuri-su / XSS
Last active December 13, 2017 08:29
![](x"/**/onerror="alert('xss!!!')")
github是采用存入的时候,对特殊符号进行转义,从而无效掉
e.g.
<p><a href="/Kuri-su/Some-classic-algorithms/blob/master/x%22/**/onerror=%22alert('xss!!!')%22" target="_blank"><img src="/Kuri-su/Some-classic-algorithms/raw/master/x%22/**/onerror=%22alert('xss!!!')%22" alt="sdsdssdsd" style="max-width:100%;"></a></p>
也可以采用markdown转成html后去掉全部的onxxxxxx的方法,例如onload,onerror
./configure \
--prefix=/usr/local/php72 \
--sysconfdir=/etc/php72 \
--with-config-file-path=/etc/php72 \
--with-config-file-scan-dir=/etc/php72/php-fpm.d \
--with-fpm-user=www \
--with-fpm-group=www \
--with-curl \
--with-mhash \
--with-gd \
@Kuri-su
Kuri-su / py 序列(Sequence) 介绍
Created February 4, 2018 16:53
py 序列(Sequence) 介绍
序列的主要功能是资格测试(Membership Test)(也就是 in 与 not in 表达式)和索引操作(Indexing Operations),它们能够允许我们直接获取序列中的特定项目。
上面所提到的序列的三种形态——列表、元组与字符串,同样拥有一种切片(Slicing)运算符,它能够允许我们序列中的某段切片——也就是序列之中的一部分。
@Kuri-su
Kuri-su / gist:0566db67363ff42a14cc1278146d9c5f
Created July 2, 2018 09:10
Lists of Throwable and Exception tree as of 7.2.0
Lists of Throwable and Exception tree as of 7.2.0
Error
ArithmeticError
DivisionByZeroError
AssertionError
ParseError
TypeError
ArgumentCountError
Exception
PHP中什么是异常:
  程序在运行中出现不符合预期的情况,允许发生(你也不想让他出现不正常的情况)但他是一种不正常的情况,按照我们的正常逻辑本不该出的错误,但仍然会出现的错误,属于逻辑和业务流程的错误,而不是编译或者语法上的错误。
  PHP中什么是错误:
  属于php脚本自身的问题,大部分情况是由错误的语法,服务器环境导致,使得编译器无法通过检查,甚至无法运行的情况。warning、notice都是错误,只是他们的级别不同而已,并且错误是不能被try-catch捕获的。
  上面的说法是有前提条件的:
  在PHP中,因为在其他语言中就不能这样下结论了,也就是说异常和错误的说法在不同的语言有不同的说法。在PHP中任何自身的错误或者是非正常的代码都会当做错误对待,并不会以异常的形式抛出,但是也有一些情况会当做异常和错误同时抛出(据说是,我没有找到合适的例子)。也就是说,你想在数据库连接失败的时候自动捕获异常是行不通的,因为这就不是异常,是错误。但是在java中就不一样了,他会把很多和预期不一致的行为当做异常来进行捕获。
  PHP异常处理很鸡肋?
blogGist开头,半角冒号:分割
然后紧接show / unshow
多个文件的话用两条横杠分段
private默认不展示,如果是show的话会展示
@Kuri-su
Kuri-su / proxy.md
Last active August 2, 2018 02:24
正向代理,反向代理和透明代理
@Kuri-su
Kuri-su / php-fpm-a.md
Last active August 2, 2018 05:24
关于php连接池的讨论