Skip to content

Instantly share code, notes, and snippets.

Avatar
🏙️
Building Vue & Nuxt sites

Jakub Zomerfeld devzom

🏙️
Building Vue & Nuxt sites
  • ENGINIETY
  • Poznan, Poland
View GitHub Profile
@devzom
devzom / ssh_multikeys.md
Last active Sep 25, 2021 — forked from jmcaldera/ssh_multikeys.md
Multiple SSH Keys macOS
View ssh_multikeys.md

Multiple SSH Keys on same client

Check if you have existing keys by opening the terminal and entering: ssh-add -l OR ls -al ~/.ssh and check for any file called (usually) id_rsa or similar

Identify the host you're using your current key for. You probably added this key to, for example your github or gitlab account. We will use this later on.

If you don't have a config file on ~/.ssh folder, you will need to create one. We'll get back to this later.

View promises.js
function loadScript(src) {
return new Promise(function(resolve, reject) {
let script = document.createElement('script');
script.src = src;
script.onload = () => resolve(script);
script.onerror = () => reject(new Error("Script load error: " + src));
document.head.append(script);
});
@devzom
devzom / nuxt-axios-cache.js
Created Dec 2, 2020 — forked from Tuarisa/nuxt-axios-cache.js
Nuxt axios cache plugin
View nuxt-axios-cache.js
import hash from 'object-hash'
import sizeof from 'object-sizeof'
import lruCache from 'lru-cache'
const cacheEnabled = true
const cacheMaxAge = 30 * 60 * 1000
const cacheMaxSize = 128 * 1000 * 1000
const getCacheKey = obj => hash(obj)
@devzom
devzom / .htaccess
Created Oct 20, 2020 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#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/
@devzom
devzom / AdbCommands
Created Mar 21, 2019 — forked from Pulimet/AdbCommands
Adb useful commands list
View AdbCommands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell