Skip to content

Instantly share code, notes, and snippets.

View Stefan2142's full-sized avatar

Stefan2142 Stefan2142

  • Pozarevac, Serbia
View GitHub Profile
@rluvaton
rluvaton / getFolderSize.js
Last active June 26, 2023 12:15
Get Folder Size - App Script
var count = 0;
function myFunction() {
Logger.log('Starting');
// Please Write the path of the folder you want sub path seperated with slash(,) (spaces are counted)
// for example: for myFolder/test -> myFolder,test
// And NOT myFolder, test
var folders = [];
if(!folders) {
@henrebotha
henrebotha / instructions.md
Last active March 30, 2024 22:37
Karabiner Elements: Caps Lock + I/J/K/L to Arrow Keys (a la Pok3r)

Instructions

  1. Install Karabiner Elements
  2. Open your karabiner.json file (it will be in ~/.config/karabiner/karabiner.json).
  3. Find complex_modifications. It will have a key rules that takes a list ("rules": [...]).
  4. Inside the square brackets, paste this:
{
    "description": "Change Caps Lock + I/J/K/L to Arrow Keys",
@henrych4
henrych4 / download_GoogleDrive.py
Last active January 17, 2024 04:02
A python script for downloading file in google drive
#Reference: https://stackoverflow.com/questions/38511444/python-download-files-from-google-drive-using-url
import requests
def download_file_from_google_drive(id, destination):
URL = "https://docs.google.com/uc?export=download"
session = requests.Session()
response = session.get(URL, params = { 'id' : id }, stream = True)
@NeuroWinter
NeuroWinter / ffmpeg cheatsheet for glitching
Last active April 13, 2024 09:09
ffmpeg cheatsheet for glitching
FFMPEG '-i', file, '-c:v', 'libopenjpeg', "jpeg2000\\" + name + ".jp2"\
Convert image to jpeg2000
ffmpeg -i in.png -c:v libopenjpeg out.jp2
Hex Edit out.jp2
ffmpeg -i in.jp2 -c:v png out.png
General Edit
ffmpeg -i input.avi -c:v mpeg2video -g 999 -q:v 1 output.avi
*edit in avidemux/whatever*
@casschin
casschin / gist:1990245
Created March 7, 2012 01:16
Python webdriver api quick sheet
### Locating UI elements ###
# By ID
<div id="coolestWidgetEvah">...</div>
element = driver.find_element_by_id("coolestWidgetEvah")
or
from selenium.webdriver.common.by import By
element = driver.find_element(by=By.ID, value="coolestWidgetEvah")
# By class name: