Skip to content

Instantly share code, notes, and snippets.

View dogeow's full-sized avatar
🤔
Code is cheap, show me the house and car.

Chemees dogeow

🤔
Code is cheap, show me the house and car.
View GitHub Profile
@dogeow
dogeow / dabblet.css
Created October 14, 2022 02:45
Polka dot
/**
* Polka dot
*/
background: #black;
background-image: radial-gradient(tan 20%, transparent 0),
radial-gradient(tan 20%, transparent 0);
background-size: 30px 30px;
background-position: 0 0, 15px 15px;
@dogeow
dogeow / 233.php
Last active July 11, 2019 04:42
PHP 解析 JavaScript 中规则为 String(!![])+(1+[]) 的代码为最终结果
<?php
/*
JavaScript 表达式,如下:
String((((![]+!![])+(!![]-!+[]+[]))/(!+[]-![]+!![]-!+[]+!![]-[]-![]-[])))+(((![]+!![])+(!![]-!+[]+[]))/(!+[]-![]+!![]-!+[]+!![]-[]-![]-[]))
结构是:String(...)+(...),为字符串拼接,所以我们要依次获取左右两边的表达式,然后替换「[]」之类的为数字进行运算
注意:偶尔 (...) 里面的也是字符串拼接,所以需要判断。比如 1+[] 的结果就是字符串 "1"
*/
@dogeow
dogeow / 233.php
Created July 11, 2019 04:37
PHP转换 JavaScript 中规则为 String(!![])+(1+[])
<?php
/*
JavaScript 表达式,如下:
String((((![]+!![])+(!![]-!+[]+[]))/(!+[]-![]+!![]-!+[]+!![]-[]-![]-[])))+(((![]+!![])+(!![]-!+[]+[]))/(!+[]-![]+!![]-!+[]+!![]-[]-![]-[]))
结构是:String(...)+(...),为字符串拼接,所以我们要依次获取左右两边的表达式,然后替换「[]」之类的为数字进行运算
注意:偶尔 (...) 里面的也是字符串拼接,所以需要判断。比如 1+[] 的结果就是字符串 "1"
*/