Skip to content

Instantly share code, notes, and snippets.

View shavidzet's full-sized avatar
👀
Learning

Tornike Shavidze shavidzet

👀
Learning
  • Tbilisi, Georgia
View GitHub Profile
@shavidzet
shavidzet / run.sh
Last active November 8, 2022 19:56
TP-Link TL-WN881ND driver for linux distros
#!/bin/bash
git clone https://github.com/lwfinger/rtlwifi_new.git
cd rtlwifi_new
git checkout rtw88
make
sudo make install
sudo modprobe rtl8188ee
@shavidzet
shavidzet / script.js
Created February 17, 2020 20:10
clockify-project-selector
(() => {
const entries = document.querySelector('.detailed__report__entries ul').children
let n = 0
setInterval(() => {
entries[n].querySelector('.detailed__report__project__link').click()
setTimeout(() => {
document.querySelector('.project-picker__container .project-picker--list .ng-star-inserted:nth-child(2)').children[3].querySelector('.project-picker--project--client .project-picker--project-name').click()
n++
}, 500)
}, 1000)
@shavidzet
shavidzet / spam.js
Last active February 5, 2020 01:16
Slack message emoji spammer
(async () => {
const toggleEmojiList = () => document.querySelector('#add-reaction').click()
const getEmojiNodes = () => document.querySelectorAll('[id^=emoji]:not(.hidden)[aria-label*=emoji]')
const sleep = (ms) => new Promise((resolve, reject) => setTimeout(resolve, ms))
let emojiN = 0
let emojiLength = null
if (!emojiLength) {
toggleEmojiList()
@shavidzet
shavidzet / netlify-env-variables-export.js
Last active December 9, 2019 16:40
Export netlify environment variables as regular array of objects
/*
1. open url: https://app.netlify.com/sites/{projec_name}/settings/deploys#environment
2. click on edit variables
3. run following code
*/
const envs = [...$0.querySelectorAll('input')].reduce((state, i, k) => {
if ((k % 2 !== 0 || k === 0) && $0.querySelectorAll('input').length - 1 !== k) {
return state
} else if ($0.querySelectorAll('input').length - 1 === k) {
@shavidzet
shavidzet / bs-breakpoint-mixin-usage.scss
Created December 1, 2019 00:21
Use bootstrap mixin for breakpoints
@import "~bootstrap/scss/functions";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/mixins/_breakpoints";
@include media-breakpoint-up(md) {
body {
background-color: red;
}
}
@shavidzet
shavidzet / spam.js
Created August 13, 2019 03:03
Telegram spammer
;(async () => {
for (let i = 0; i < 999999999999; i++) {
await sleep(1000)
sendMessage(`Hi bitch ${i}`)
}
})()
<!DOCTYPE html>
<html>
<body>
<h1> picture </h1>
<p>HTML images are defined with the img tag </p>
<br>
<img src="https://www.w3schools.com/html/w3schools.jpg" />
<button>Click me</button>
<ul>
<li> weed </li>
# -*- coding: utf-8 -*-
import os, fnmatch
def findReplace(directory, find, replace, filePattern):
for path, dirs, files in os.walk(os.path.abspath(directory)):
for filename in fnmatch.filter(files, filePattern):
filepath = os.path.join(path, filename)
with open(filepath) as f:
s = f.read()
s = s.replace(find, replace)
@shavidzet
shavidzet / 000-abc.markdown
Last active August 12, 2018 01:36
Host front-end code on github pages trough Buddy CI/CD

Host front-end code on github pages trough Buddy CI/CD

import os, fnmatch
def findReplace(directory, find, replace, filePattern):
for path, dirs, files in os.walk(os.path.abspath(directory)):
for filename in fnmatch.filter(files, filePattern):
filepath = os.path.join(path, filename)
with open(filepath) as f:
s = f.read()
s = s.replace(find, replace)
with open(filepath, "w") as f:
f.write(s)