Skip to content

Instantly share code, notes, and snippets.

View patsma's full-sized avatar
💭
Perfection is not attainable, but if we chase perfection we can catch excellence

Patryk Smakosz patsma

💭
Perfection is not attainable, but if we chase perfection we can catch excellence
View GitHub Profile
Some may find this confusing, but I like to tack .reverse() onto the end and toggle an animation like this...
var tl = new TimelineMax()
.to("#box", 0.25, { opacity: 0.5, scale: 0.75 })
.reverse();
$("#box").click(function() {
tl.reversed(!tl.reversed());
});
http://codepen.io/osublake/pen/9d46535fe6e5b5c8f577308a5ae1ea72
@patsma
patsma / main.js
Created July 19, 2021 13:13
ScrollTrigger example
// "use strict";
window.addEventListener('load', () => {
(function () {
gsap.registerPlugin(ScrollTrigger);
gsap.set('body', {autoAlpha: 1})
gsap.set('html', {overflow: 'visible'})
@patsma
patsma / cloudSettings
Last active June 21, 2021 12:45
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-12-07T07:27:29.821Z","extensionVersion":"v3.4.3"}
[text* fname placeholder "First name*"][text* lname placeholder "Last name*"][email* email placeholder "Email address*"][text* tel placeholder "Telephone*"][text* city placeholder "City*"][text* postcode placeholder "Postcode*"][text company placeholder "Company"][text website placeholder "Website"][select country "Afghanistan" "Albania" "Algeria" "American Samoa" "Andorra" "Angola" "Anguilla" "Antarctica" "Antigua and Barbuda" "Argentina" "Armenia" "Aruba" "Australia" "Austria" "Azerbaijan" "Bahamas" "Bahrain" "Bangladesh" "Barbados" "Belarus" "Belgium" "Belize" "Benin" "Bermuda" "Bhutan" "Bolivia" "Bosnia and Herzegowina" "Botswana" "Bouvet Island" "Brazil" "British Indian Ocean Territory" "Brunei Darussalam" "Bulgaria" "Burkina Faso" "Burundi" "Cambodia" "Cameroon" "Canada" "Cape Verde" "Cayman Islands" "Central African Republic" "Chad" "Chile" "China" "Christmas Island" "Cocos Islands" "Colombia" "Comoros" "Congo" "the Democratic Republic of the Congo" "Cook Islands" "Costa Rica" "Cote d'Ivoire" "Croatia
Options -Indexes
<Files ~ '\.(env|json|config.js|md|gitignore|gitattributes|lock)$'>
Order allow,deny
Deny from all
</Files>
<Files ~ '(composer.json)$'>
Order allow,deny
Deny from all
</Files>
RewriteEngine on
@patsma
patsma / .htaccess
Created May 18, 2021 10:59
yoyo.htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^wp-content/uploads/(.*) https://dev.yoyo-designs.com/wp-content/uploads/$1 [R=301,NC,L]
#This Apache config file was created by Duplicator Installer on 2021-05-18 00:49:17.
#The original can be found in archived file with the name .htaccess__[HASH]
# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
convert image.jpg -sampling-factor 4:2:0 -strip -quality 85 -interlace JPEG -colorspace RGB image_converted.jpg
When you think your git is messed up, you can use this command to do everything up-to-date.
git rm -r --cached .
git add .
git commit -am 'git cache cleared'
git push
Also to revert back last commit use this :
git reset HEAD^ --hard
git switch -c <new-branch>