- 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
// http://stackoverflow.com/questions/31683075/how-to-do-a-deep-comparison-between-2-objects-with-lodash | |
function compare(a, b) { | |
var result = { | |
different: [], | |
missing_from_first: [], | |
missing_from_second: [] | |
}; | |
_.reduce(a, function (result, value, key) { |
function isScrolledIntoView(elem) | |
{ | |
var $elem = $(elem); | |
var $window = $(window); | |
var docViewTop = $window.scrollTop(); | |
var docViewBottom = docViewTop + $window.height(); | |
var elemTop = $elem.offset().top; | |
var elemBottom = elemTop + $elem.height(); |
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]` + |
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
// 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 ( |
const removeSearchParam = param => { | |
const url = new URL(window.location.href) | |
url.searchParams.delete(param) | |
window.history.replaceState(null, null, url) | |
} |
<?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(); |
.text-xs-left { | |
text-align: left !important; | |
} | |
.text-xs-right { | |
text-align: right !important; | |
} | |
.text-xs-center { | |
text-align: center !important; |