Skip to content

Instantly share code, notes, and snippets.

View Stosiu's full-sized avatar
🚀

Aleksander Stós Stosiu

🚀
View GitHub Profile
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const APP_DIR = path.resolve(__dirname, '..', 'src')
const BUILD_DIR = path.resolve(__dirname, '..', 'dist')
const ENV = process.env.NODE_ENV || 'development'
@Stosiu
Stosiu / example.html
Last active September 20, 2018 11:55
<picture>
<source media="(min-width: 650px)" srcset="header_850x350.jpg">
<source media="(min-width: 320px)" srcset="header_420x150.jpg">
<img src="header_1920x800.jpg" alt="Header">
</picture>
@Stosiu
Stosiu / example.css
Last active September 20, 2018 11:55
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
.header {
background-image: url(header_420x150.jpg);
}
}
@Stosiu
Stosiu / index.js
Created July 9, 2018 22:19
Axios auto-retry
const delayPromiseFactory = (delay) => {
return new Promise((resolve, reject) => {
setTimeout(resolve, delay);
});
}
const axiosAutoRetry = (factoryFn, retryOnCodes, retryMax, maxTimeOff) => {
retryOnCodes = retryOnCodes || [];
maxTimeOff = maxTimeOff || 5000;
const delayPromiseFactory = (delay) => (
new Promise((resolve, reject) => {
setTimeout(resolve, delay);
});
)
const axiosAutoRetry = (factoryFn, retryOnCodes, retryMax, maxTimeOff) => {
retryOnCodes = retryOnCodes || [];
maxTimeOff = maxTimeOff || 5000;
// Imports
import UIKit
import SceneKit
import PlaygroundSupport
let sceneView = SCNView(frame: CGRect(x: 0, y: 0, width: 500, height: 500))
var scene = SCNScene()
sceneView.scene = scene
sceneView.showsStatistics = true
sceneView.allowsCameraControl = true

Keybase proof

I hereby claim:

  • I am stosiu on github.
  • I am stosiu (https://keybase.io/stosiu) on keybase.
  • I have a public key whose fingerprint is 110D 0C1D D132 7EFD F0D4 5909 07B8 662B 51EA B241

To claim this, I am signing this object: