Skip to content

Instantly share code, notes, and snippets.

@royce002
royce002 / gsap-week4-scrolling-challenges-june-2020.markdown
Created November 23, 2020 17:55
GSAP - 頁面捲動動畫效果 (week4 scrolling challenges June 2020)

GSAP - 頁面捲動動畫效果 (week4 scrolling challenges June 2020)

利用 GSAP ScrollTrigger Pluging 製作簡單頁面捲動動畫效果

A Pen by RayPan on CodePen.

License.

@royce002
royce002 / GSAP Full Screen Scrolliing
Last active April 27, 2023 14:04
Parallax GSAP Scroll Trigger
<body>
<nav>
<img src="https://bit.ly/2NKLFXr" alt="">
<div>
<ul id="ul-menu">
<li><a id="menu_link" href="#section_beaches">Beaches</a></li>
<li><a id="menu_link" href="#section_temples">Civlization</a></li>
<li><a id="menu_link" href="#section_places">Places</a></li>
</ul>
@royce002
royce002 / get_php_not_empty.php
Created October 14, 2020 17:50
Get a php variable from the url and ensure it's not empty
<?php
if (!empty($_GET['variable'])) {
// Do something.
}
?>
<?php
function isRussian($text) {
return preg_match('/[А-Яа-яЁё]/u', $text);
}
?>
@royce002
royce002 / Bootstrap 4.5 Carousel.htm
Created September 9, 2020 17:43
Carousel for Bootstrap 4.5
@royce002
royce002 / bootstrap-4.5.2.htm
Created August 26, 2020 20:36
Starter template for bootstrap 4.5.2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Bootstrap 4.5.2 Starter Template</title>
<!-- Bootstrap core CSS -->
(http(s?):)([/|.|\w|\s|-])*\.(?:jpg|gif|png)
@royce002
royce002 / Script to drop into Google Sheets.js
Created April 16, 2020 02:45
Script to add to Google Sheets
// original from: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
// original gist: https://gist.github.com/willpatera/ee41ae374d3c9839c2d6
function doGet(e){
return handleResponse(e);
}
// Enter sheet name where data is to be written below
var SHEET_NAME = "Sheet1";
@royce002
royce002 / Google-Sheets-Form-Data-Submit.js
Created April 16, 2020 02:41
Adding form data to Google Sheets
$.fn.serializeObject = function() {
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || "");
} else {
@royce002
royce002 / Auto-Comment WP Blacklist.txt
Last active March 25, 2020 19:11
Auto blacklist characters for WordPress
=================================================================
Ultimate Comment Blacklist
Source:
Ultimate Comment Blacklist for WordPress
https://perishablepress.com/wordpress-ultimate-comment-blacklist/
License: