Skip to content

Instantly share code, notes, and snippets.

<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Buffer -->
<a href="https://bufferapp.com/add?url=https://simplesharebuttons.com&amp;text=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/buffer.png" alt="Buffer" />
</a>
<!-- Digg -->
<a href="http://www.digg.com/submit?url=https://simplesharebuttons.com" target="_blank">
@pascalknecht
pascalknecht / wp.sh
Created February 1, 2018 19:51 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@pascalknecht
pascalknecht / .htpasswd
Created May 18, 2018 12:12 — forked from enrikberisha/.htpasswd
.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
AuthType Basic
AuthName "BETA Site"
AuthUserFile "/var/www/vhosts/rederp.ch/html/_beta.rederp.ch/.htpasswd"
Require valid-user
</IfModule>
wk:$apr1$R.JuDQ11$V6oReBCgR7Jc52.JJG6n9/
@pascalknecht
pascalknecht / .htpasswd
Created May 18, 2018 12:12 — forked from enrikberisha/.htpasswd
.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
AuthType Basic
AuthName "BETA Site"
AuthUserFile "/var/www/vhosts/rederp.ch/html/_beta.rederp.ch/.htpasswd"
Require valid-user
</IfModule>
wk:$apr1$R.JuDQ11$V6oReBCgR7Jc52.JJG6n9/
@pascalknecht
pascalknecht / OnBlurComponent.jsx
Created May 18, 2021 06:14 — forked from pstoica/OnBlurComponent.jsx
onBlur for entire react element
function OnBlurComponent({ onBlur }) {
const handleBlur = (e) => {
const currentTarget = e.currentTarget;
// Check the newly focused element in the next tick of the event loop
setTimeout(() => {
// Check if the new activeElement is a child of the original container
if (!currentTarget.contains(document.activeElement)) {
// You can invoke a callback or add custom logic here
onBlur();