This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LineController } from 'chart.js'; | |
class CustomLineChart extends LineController { | |
draw() { | |
super.draw(); | |
if (this.chart.tooltip._active && this.chart.tooltip._active.length) { | |
let activePoint = this.chart.tooltip._active[0], | |
ctx = this.chart.ctx, | |
x = activePoint.element.x, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<details :style="unknownCountry ? 'pointer-events: none;' : null"> | |
<summary @click="getShippingData(country[1])" > | |
<img :src="getFlag(country)" alt=""> | |
<h3>{{ country[0] }}</h3> | |
</summary> | |
<div class="listContainer"> | |
<img v-if="!shippingData" src="../assets/img/loader.svg" /> | |
<div v-if="shippingData" class="list"> | |
<h2><u>{{ country[0] }}</u></h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def clock(time) | |
time = time.split(':') | |
hour = time.first.to_i | |
minute = time.last.to_i | |
angle = ((minute * 6) - (hour * 30)) | |
if angle < 0 | |
angle = angle.abs + minute * 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//paste into your browser dev console and mouse over your contribution graph. | |
document.querySelectorAll("rect.day").forEach(c => c.addEventListener('mouseover', function (e) {e.target.style.fill = '#196127'})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a react component that's a part of an SVG corrupting web app I made: | |
// https://x8bitrain.github.io/svg-emoji-corrupt/ | |
// While code is long the main function that does the actual manipulation is just a | |
// for loop that changes integer values when it matches a certain regex. | |
import React, { Component } from 'react'; | |
import UIkit from 'uikit'; | |
let svgDataLock = 0; // This stops svgOG from being updated the first execution. | |
let svgOG = []; // This is used to store a clone of the original values the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Generate Random Color | |
function getRandomColor() { | |
var letters = '0123456789ABCDEF'; | |
var color = '#'; | |
for (var i = 0; i < 6; i++) { | |
color += letters[Math.floor(Math.random() * 16)]; | |
} | |
return color; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Section "InputClass" | |
Identifier "libinput" | |
Driver "libinput" | |
MatchDevicePath "/dev/input/event*" | |
MatchIsTouchpad "true" | |
Option "Tapping" "True" | |
Option "TappingDragLock" "False" | |
Option "PalmDetection" "True" | |
Option "ButtonMapping" "1 2 3" |
NewerOlder