This file contains hidden or 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
pull-ppa-source -d --ppa SOURCE_PPA SOURCE_PACKAGE UBUNTU_VERSION FULL_PACKAGE_VERSION # download orig and debian | |
# unpack both | |
# mv debian -> extracted .orig archive | |
cd YOUR_EXTRACTED_ARCHIVE | |
dch -i # edit the changelog, bump non-semver | |
sudo apt-get build-dep . # install build deps | |
dpkg-buildpackage -S -sa -k"$KEY_ID" # build source package. `-sa` super important! Else the .orig wont be added to the upload/changes file. This assumes you imported your gpg private/public and KEY_ID is your gpg key id | |
dput --debug YOUR_PPA YOUR_CHANGES_FILE |
This file contains hidden or 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 | |
set -e | |
sudo fallocate -l $SIZE swapfile | |
sudo chmod 600 swapfile | |
sudo mkswap swapfile | |
sudo swapon swapfile |
This file contains hidden or 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 | |
# somtimes the terminal breaks when closing an application, this fixes it | |
stty sane |
This file contains hidden or 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 very crude, keep this in mind before including it in production and relying on it | |
#it is WAY faster | |
if 'linux' in sys.platform: | |
from shutil import copytree | |
else: | |
def copytree(src, dst): | |
"""DOES NOT sanitize input""" | |
import os | |
src = os.path.normpath(src) | |
dst = os.path.normpath(dst) |
This file contains hidden or 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
s = Array.from(document.getElementsByClassName("btnCalculate")).map( x => parseInt(x.parentNode.getElementsByClassName('white')[0].innerText.replaceAll(',',''))).reduce( (t, x) => t+x ) | |
container = document.createElement('span') | |
container.class = 'silver' | |
txt = "" | |
s_txt = s + "" | |
for(let c = 0; c < s_txt.length; c++){ | |
if(c != 0 && ((s_txt.length - c) % 3 == 0)){ | |
txt += "," | |
} | |
txt += s_txt[c] |
This file contains hidden or 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
let interactive_script = true; | |
function call_evt_onchange(element){ | |
if ("createEvent" in document) { | |
let evt = document.createEvent("HTMLEvents"); | |
evt.initEvent("change", false, true); //random DOM garbage | |
element.dispatchEvent(evt); | |
} else { | |
element.fireEvent("onchange"); | |
} | |
} |