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
#!/bin/bash | |
# This script is used to record area of the screen (using slop) and save it to a file | |
# Script can be stopped in tray by clicking on the icon | |
# Dependencies: slop, ffmpeg, xclip, notify-send, yad, nemo | |
# Options | |
icon="/usr/share/icons/Papirus/48x48/apps/record-desktop.svg" | |
dir="$HOME/Videos/recordings" |
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 split_at_newline(text, max_chars=4300): | |
rows = text.split('\n') | |
char_count = 0 | |
messages = [] | |
current_msg = '' | |
for text in rows: | |
new_char_count = char_count + len(text) | |
current_msg += text + '\n' |
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 tulostaLuvunKertoma(n: int) -> None: | |
print(f'{n}! = {laskeKertoma(n)}') | |
def lueKokonaisluku() -> int: | |
return int(input('Anna kokonaisluku: ')) | |
def laskeKertoma(n: int) -> int: | |
factorial = 1 |
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 collections | |
import json | |
chat_name = '' | |
from_name = '' | |
with open('result.json', 'r', encoding='utf8') as f: | |
content = f.read() | |
data = json.loads(content) |
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
// | |
// Kallen autoexec.cfg | |
// Launch options: -novid -tickrate 128 -high | |
// | |
// Crosshair | |
cl_crosshairsize 2.5 | |
cl_crosshairgap -3 | |
cl_crosshairalpha 225 |
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
module vrobot | |
/* This is C's INPUT struct | |
typedef struct tagINPUT { | |
DWORD type; | |
union { | |
MOUSEINPUT mi; | |
KEYBDINPUT ki; | |
HARDWAREINPUT hi; |
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 os | |
import queue | |
import sys | |
import threading | |
import requests | |
from colorama import Fore, init | |
script_path = os.path.dirname(os.path.realpath(__file__)) | |
accs_file = os.path.join(script_path, 'accs.txt') |
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
#include <iostream> | |
#include <Windows.h> | |
#include <TlHelp32.h> | |
using namespace std; | |
uintptr_t GetModuleBaseAddress(DWORD procId, const wchar_t* modName); | |
void quit(const string& message); | |
int main() { |
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
const timeEl = document.createElement('div'); | |
const canvas = document.createElement('canvas'); | |
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D; | |
const size = 300; | |
const r = (size / 2) * 0.9; | |
canvas.style.border = '1px solid gray'; | |
canvas.width = size; | |
canvas.height = size; |
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
class Solution: | |
def simplifyPath(self, path: str) -> str: | |
current_path = [] | |
path = path.replace('//', '/') | |
parts = list(filter(None, path.split('/'))) | |
for part in parts: | |
if part == '.': | |
continue | |
elif part == '..': |
NewerOlder