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
.wpcf7 form input {
-webkit-user-select: text;
}
<div class="image-container-block">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/65984/photo-1413752567787-baa02dde3c65.jpg" alt="">
<div class="inner-image-block">
<div class="image-animate-border"></div>
</div>
</div>
<style>
</style>
var element = document.querySelector(prompt('Insert the querySelector to the svg element.', '#gear'));
var bbox = element.getBBox(),
x = bbox.x,
y = bbox.y,
w = bbox.width,
h = bbox.height
;
var result =
'center center' + "\n" +
@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"}
@patsma
patsma / Add filter to SVG
Created February 8, 2020 15:05
Dynamically add filter to your SVG
function setSvgAttrs() {
let svg = document.getElementsByTagName('svg')[0];
gsap.set(svg, {attr: {viewBox: '0 0 970 250'}});
const background01 = document.querySelector('#background01');
function createFilter() {
const svgns = "http://www.w3.org/2000/svg";
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
const svg = document.getElementById('scene').getSVGDocument();
const shape01 = svg.getElementById('shape-01');
@patsma
patsma / .htaccess
Created February 4, 2021 14:12 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
Why not cp to location 1, then mv to location 2. This takes care of "removing" the original.
And no, it's not the correct syntax. | is used to "pipe" output from one program and turn it into input for the next program. What you want is ;, which seperates multiple commands.
cp file1 file2 ; cp file1 file3 ; rm file1
If you require that the individual commands MUST succeed before the next can be started, then you'd use && instead:
cp file1 file2 && cp file1 file3 && rm file1
That way, if either of the cp commands fails, the rm will not run.
git switch -c <new-branch>