- Create a folder at the root of your user home folder
(Example:
C:/Users/uname/
) called.ssh
. - Create the following files if they do not already exist (paths begin from the root of your user home folder):
.ssh/config
function replaceElementTag(targetSelector, newTagString) { | |
$(targetSelector).each(function(){ | |
var newElem = $(newTagString, {html: $(this).html()}); | |
$.each(this.attributes, function() { | |
newElem.attr(this.name, this.value); | |
}); | |
$(this).replaceWith(newElem); | |
}); | |
} |
/* | |
Thanks David <3 - https://medium.freecodecamp.com/the-100-correct-way-to-do-css-breakpoints-88d6a5ba1862 | |
*/ | |
@for-phone: ~"screen and (max-width: 44.9375rem)"; // < 720 | |
@for-tablet-only: ~"screen and (min-width: 45rem) and (max-width: 74.9375rem)"; // > 720 < 1199 | |
@for-tablet-portrait-only: ~"screen and (min-width: 45rem) and (max-width: 56.1875rem)"; // > 720 < 900 | |
@for-tablet-portrait-up: ~"screen and (min-width: 45rem)"; // > 720 | |
@for-tablet-landscape-up: ~"screen and (min-width: 56.25rem)"; // > 900 | |
@for-desktop-up: ~"screen and (min-width: 75rem)"; // > 1200 | |
@for-big-desktop-up: ~"screen and (min-width: 112.5rem)"; // > 1800 |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<clear /> | |
<rule name="TempRewriteToWeb" stopProcessing="false"> | |
<match url="^(web/)?(.*)$" /> | |
<action type="Rewrite" url="web/{R:2}" logRewrittenUrl="true" /> | |
</rule> |
.text-xs-left { | |
text-align: left !important; | |
} | |
.text-xs-right { | |
text-align: right !important; | |
} | |
.text-xs-center { | |
text-align: center !important; |
<?php | |
function nice_search_redirect() { | |
global $wp_rewrite; | |
if ( !isset( $wp_rewrite ) || !is_object( $wp_rewrite ) || !$wp_rewrite->using_permalinks() ) | |
return; | |
$search_base = $wp_rewrite->search_base; | |
if ( is_search() && !is_admin() && strpos( $_SERVER['REQUEST_URI'], "/{$search_base}/" ) === false ) { | |
wp_redirect( home_url( "/{$search_base}/" . urlencode( get_query_var( 's' ) ) ) ); | |
exit(); |
const removeSearchParam = param => { | |
const url = new URL(window.location.href) | |
url.searchParams.delete(param) | |
window.history.replaceState(null, null, url) | |
} |
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
function outOfViewport(colorWrapper, colorTag, colorClass) { | |
const bodyWidth = document.body.offsetWidth; | |
const list = document.querySelectorAll('*'); | |
for (let elem of list) { | |
if (elem.offsetWidth > bodyWidth) { | |
console.log( | |
`%c [` + | |
`%c` + elem.tagName + | |
`%c.` + elem.classList + | |
`%c]` + |