Skip to content

Instantly share code, notes, and snippets.

View S3ak's full-sized avatar
🏠
Working from home

Monde Sineke S3ak

🏠
Working from home
View GitHub Profile
/* eslint-disable @next/next/no-img-element */
import { Button, Container, Paper, Title, Text, Card } from "@mantine/core";
import { useRef } from "react";
import { setTimeout } from "timers";
/**
* Captures the image using the browsers camera api
* @component */
export default function Capture() {
const videoRef = useRef<HTMLVideoElement>(null);
@S3ak
S3ak / yoco-logo-lottie-animation.json
Last active September 23, 2020 16:20
Lottie animation file for Yoco
var a,b;"undefined"!=typeof navigator&&(a=window||{},b=function(window){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,blitter=10,BMMath={};function ProjectInterface(){return{}}!function(){var t,e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],r=e.length;for(t=0;t<r;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===typeof t&&t.length){var e,r=createSizedArray(t.length),i=t.length;for(e=0;e<i;e+=1)r[e]=Math.abs(
@S3ak
S3ak / atom-settings
Created November 27, 2017 18:22
atom-settings
a
Configuration Storage
Install RimRaf:
npm install rimraf -g
And in the project folder delete the node_modules folder with:
rimraf node_modules
@S3ak
S3ak / OOCSS size helpers
Last active August 29, 2015 14:15
OOCSS size helpers
// Sizes are determined by the golden ratio formula
$ms-base: 8px;
$ms-ratio: $golden;
$ms-xs: $ms-base;
$ms-sm: floor((ms(2)));
$ms-md: floor((ms(3)));
$ms-lg: floor((ms(4)));
$ms-xl: floor((ms(6)));
@S3ak
S3ak / SpeedTest
Created February 3, 2015 20:23
Function to test speed
var SpeedTest = function(testImplement,testParams,repetitions){
this.testImplement = testImplement;
this.testParams = testParams;
this.repetitions = repetitions || 10000;
this.average = 0;
};
SpeedTest.prototype = {
startTest: function(){
if( this.testImplement( this.testParams ) === false ){
@S3ak
S3ak / Terminal Serial Code
Created January 17, 2015 14:36
Get Serial no. via terminal
To retrieve serial number of the computer run the following command
wmic bios get serialnumber
To retrieve model name of the computer run the following command
wmic csproduct get name
@S3ak
S3ak / Sublime ignore
Created January 12, 2015 13:43
Sublime Text project settings to ignore folders
{
"folders":
[
{
"path": "src",
"folder_exclude_patterns": ["backup"]
},
{
"path": "docs",
"name": "Documentation",
/// Mixin helping defining both `width` and `height` simultaneously.
///
/// @author Hugo Giraudel
///
/// @access public
///
/// @param {Length} $width - Element's `width`
/// @param {Length} $height ($width) - Element's `height`
///
/// @example scss - Usage