Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View devzom's full-sized avatar
:octocat:
Coding for life and fun

Jakub Zomerfeld devzom

:octocat:
Coding for life and fun
View GitHub Profile
@DWboutin
DWboutin / directUploadToS3.js
Created March 31, 2019 22:33
Direct image url to S3 wiht axios and nodejs
import AWS from 'aws-sdk';
import stream from 'stream'
import axios from 'axios';
export default async (url, filename, callback) => {
const s3 = new AWS.S3({ params: { Bucket: process.env.STATIC_MAPS_BUCKET }});
let contentType = 'application/octet-stream'
let promise = null
const uploadStream = () => {
@holisticnetworking
holisticnetworking / index.html
Created March 25, 2019 17:34
Slick Carousel Opens Synced Bootstrap Modal
<div class="slider-nav">
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=1" alt=""></div>
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=2" alt=""></div>
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=3" alt=""></div>
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=4" alt=""></div>
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=5" alt=""></div>
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=6" alt=""></div>
<div data-toggle="modal" data-target="#myModal"><img src="http://placehold.it/390x245&text=7" alt=""></div>
</div>
@jmcaldera
jmcaldera / ssh_multikeys.md
Last active April 2, 2024 18:18
Multiple SSH Keys macOS

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.

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);
});
@EmadAdly
EmadAdly / Add-ESLint-to-Laravel-Mix.md
Last active January 20, 2024 16:55
Adding eslint to your Laravel application

1. Add eslint and eslint-loader and eslint-plugin-vue to your projects package.json file

npm i eslint eslint-loader eslint-plugin-vue --save-dev

2. Create a base configuration by --init

@seanhandley
seanhandley / docker-compose.yml
Last active April 9, 2024 04:05
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@kt2763
kt2763 / nuxtjs-pagination-component.vue
Created November 24, 2017 21:35
Nuxt.js Pagination
<template>
<nav id="pagination">
<ul class="page-numbers" v-if="$store.state.totalPageCount">
<li v-for="num in this.pageNumbers" v-if="num != null" v-bind:style="{ width: (100 / pageNumberCount) + '%' }">
<nuxt-link v-if="num != $route.query.page && num != currentPage" :to="{ path: '/', query: { page: num } }">{{ num }}</nuxt-link>
<span v-else>{{ num }}</span>
</li>
</ul>
<ul class="page-guides" v-if="this.$store.state.totalPageCount != 1">
<li>
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:
@Pulimet
Pulimet / AdbCommands
Last active April 23, 2024 08:28
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@yann-yinn
yann-yinn / api.js
Created August 23, 2017 13:01
Using cachios with Nuxt.js and express
/**
* Get content from wordpress via REST Api
*/
const config = require('../nuxt.config.js')
const axios = require('axios')
// always call the proxy here :
const endpoint = config.env.proxyApiBaseUrl
/**
* @param {int} perPage : number of post to return per page