(function(){
// 关闭窗口时弹出确认提示
$(window).bind('beforeunload', function(){
// 只有在标识变量is_confirm不为false时,才弹出确认提示
if(window.is_confirm !== false)
return '您可能有数据没有保存';
})
// mouseleave mouseover事件也可以注册在body、外层容器等元素上
.bind('mouseover mouseleave', function(event){
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* globals TweenMax, Quad, Back, Elastic */ | |
/* | |
* Original implementation: https://codepen.io/wiledal/pen/ZYoNEa?editors=0010 | |
* Requires GreenSockss GSAP 2.0.1 | |
* Works with PixiJS 4.7.3 | |
*/ | |
export default class ScrollContainer { | |
constructor(x, y, width, height, itemHeight) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Swiper --> | |
<div class="swiper-container"> | |
<div class="swiper-wrapper"> | |
<div class="swiper-slide"> | |
<div class="slide-inner" style="background-image: url('http://cs412624.vk.me/v412624691/4117/RWBNZL6CLtU.jpg')"></div> | |
</div> | |
<div class="swiper-slide"> | |
<div class="slide-inner" style="background-image: url('http://cs412624.vk.me/v412624691/41ad/atM6w55Z9Xg.jpg')"></div> | |
</div> | |
<div class="swiper-slide"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
''' | |
author: ceres-c | |
usage: ./frida-extract-keystore.py | |
Once the keystore(s) have been exported you have to convert them to PKCS12 using keytool | |
''' | |
import frida, sys, time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original imp: https://github.com/jdnichollsc/Phaser-Kinetic-Scrolling-Plugin | |
// Adapted to phaser 3 By Christian Panadero | |
export default class KineticScroll { | |
private pointerId | |
private startX | |
private startY | |
private screenX | |
private screenY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules | |
dist/ | |
yarn.lock | |
wwwroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```bash | |
#!/bin/bash | |
function __base64 { | |
if [ "$1x" == "x" ]; then | |
return | |
fi | |
phpCommand="echo base64_encode(file_get_contents('$1'));" | |
php -r "$phpCommand" | pbcopy |
export const bezier = function (points, times) {
var bezier_points = [];
var points_D = [];
var points_E = [];
const DIST_AB = Math.sqrt(Math.pow(points[1]['x'] - points[0]['x'], 2) + Math.pow(points[1]['y'] - points[0]['y'], 2));
const DIST_BC = Math.sqrt(Math.pow(points[2]['x'] - points[1]['x'], 2) + Math.pow(points[2]['y'] - points[1]['y'], 2));
const EACH_MOVE_AD = DIST_AB / times;
const EACH_MOVE_BE = DIST_BC / times;
const TAN_AB = (points[1]['y'] - points[0]['y']) / (points[1]['x'] - points[0]['x']);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Upload File using jQuery.ajax() with progress support</title> | |
</head> | |
<body> | |
<input type="file" name="file" id="sel-file"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#namespace Laravel; | |
# Use: Blade::compile_all( $from_dir, $to_dir ); | |
# visit: http://araujo.cc | |
# original class from http://cutlasswp.com | |
class Blade { |
NewerOlder