Skip to content

Instantly share code, notes, and snippets.

View neyosoft's full-sized avatar
💭
Focusing

Emmanuel Obagunwa neyosoft

💭
Focusing
View GitHub Profile
@neyosoft
neyosoft / loader.css
Created June 7, 2021 11:44
HTML Loaders with CSS
.spinner-1 {
width: 50px;
height: 50px;
border-radius: 50%;
background: repeating-conic-gradient(#000 0 90deg,#ccc 0 180deg);
animation: s1 1s infinite linear;
}
@keyframes s1 {
100% {transform: rotate(.5turn)}
@neyosoft
neyosoft / ImageTools.es6
Created June 8, 2018 12:42 — forked from dcollien/ImageTools.es6
Resize Images in the Browser
let hasBlobConstructor = typeof(Blob) !== 'undefined' && (function () {
try {
return Boolean(new Blob());
} catch (e) {
return false;
}
}());
let hasArrayBufferViewSupport = hasBlobConstructor && typeof(Uint8Array) !== 'undefined' && (function () {
try {
@neyosoft
neyosoft / omitDeep.js
Created May 1, 2018 09:09 — forked from Billy-/README.md
deep version of lodash omit
function omitDeep(obj, key) {
if (Array.isArray(obj)) return omitDeepArrayWalk(obj, key)
const keys = Object.keys(obj)
const newObj = {}
keys.forEach((i) => {
if (i !== key) {
const val = obj[i]
if (Array.isArray(val)) newObj[i] = omitDeepArrayWalk(val, key)
else if (typeof val === 'object' && val !== null) newObj[i] = omitDeep(val, key)
else newObj[i] = val