This thread is supposed to be a repository for custom user-configurations.
Web browsers, operating systems, command line software, whatever else, if it has a config this is the place to share!
This is not only a thread to post your own config but also a place where to peer review other nanons configs and help others.
The purpose of using a dedicated thread instead of /Nano/g/QTDDTOT is to make it lurkable.
I will start with my own Firefox and Tor Browser user.js configuration when i finish reviewing it.
>>8660 data mining thread do not reply
>>8670 >oy vey goy, use our (((predefined settings))) goy. don't change it! y-you'll have a fingerprint goy!
Kys mordecai
I keep all of my links and contact stuff in text files that I cat stuff to with a comment to find. I started doing this when I got tired of importing a bunch of config files and was paranoid my browser might leak my bookmarks so I just do this.
>>9025 this is fucking cancer
do you hate using positional parameters ($1 $2 and so on) or are you simply not aware of those?
also quoting variables is some good advice, but i guess not in your particular case
A friend of mine wrote this for me. I use it for encoding, only changing the bitrate depending on my needs.
The encoding time is not too long and the result is great.
The way it works, you put it in a folder with a video file(can't have any spaces) and then open a terminal on the folder and type "python3 (the filename.py os the script here). It will proceed to encode all files in the folder.
#!/usr/bin/env python3
import os
from os.path import isfile
>>9041 >You should not assume where sh lives.
You should not assume where env lives.
Name an OS that has /usr/bin/env but doesn't have /bin/sh.
Protip: You can't.
In fact, I doubt you can find a UNIX-like OS that doesn't have /bin/sh in the first place.
>>9041 any linux distribution or bsd that doesn't keep at least a working /bin/sh symlink is garbage. Also, from the perspective of a humble user, I think KISS principle trumps portability every time.
I know you didn't write this but maybe someone else can answer.
Why the fuck does everyone write python scripts where you're literally just going to do "os.system(the thing)" every time your script does something?! Why not just write a bash script, bash isn't posix compliant so you have arrays and a bunch of other shit to use why would you write this in python?
>>9025 >#/bin/bash
Missing the ! of #!/bin/bash would mean the subsequent commands are not run in a separate shell, because "!" is part of the magic number "#!" - is it not so??
Re-writing what you have so you can include everything in the one file (the contact stuff you want to grep is included at the bottom of the script):
$ cat fooscript.sh
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Enter some search terms."
exit
fi
grep -- "${@}" "${0}"
exit
#commonly grepped text file included below
...
...
...
#end of commonly grepped text file
You can obviously leave out the "--" part after grep if you do want to pass extra parameters to grep as the initial arguments of your script.
>alias thatfileialwaysgrep='thatgrepscript.sh'
Why not make your a ~/bin directory, put your scripts in that, and then add the directory to your .bashrc $PATH value?
That way you can keep your scripts organized and easily invoke them without worrying if you made an alias for it or not.
>>9084 The one that takes the cake though was asukafag's bash script that pipes python code into the interpreter for it's os.random or whatever it's called function, still gives me a good laugh when I think about it
OpenSSH uses NSA-produced curves for encryption nowadays. You can disable it with this line:
[code]KexAlgorithms -*nistp*[/code]
Add it to both ssh_config and sshd_config so it applies to both your client and server.
SSH also still allows sha1 in the KexAlgorithms by default, aswell as 1024 bit DSA.
For MACs the situation is about the same. md5 of all things, sha1, and even umac with only 64 and 96 bits as algorithms in the "MACs" option are the default. As such I recommend you actually put this in your config file:
[code]KexAlgorithms -*sha1*,*nistp*,*group14*
MACs -*md5*,*sha1*,*64*,*96*[/code]
>>9479 I think most people just use whatever they first stumble on the Internet, so they never really learn shell scripting, although I'll admit that sometimes it can be a pain to write POSIX-compliant shell scripts.
You can use the shellcheck toghether with a #!/bin/sh shebang or checkbashisms to check your scripts.
>>9489 Forgot to add that you usually want to add set -u (Exists if variable is undefined) at the top of your scripts and maybe set -e (Exists if command returns non-zero exit status).
alias xargs="xargs -I{} -d'\n' -P$(nproc) stdbuf -o1M "
Basic parallel functionality but with xargs. What this ultimately means is that since you're running mostly machine code instead of a perl script, it's much faster, which is specially useful when you use parallel to spawn tasks really fast.
It also doesn't require parallel, and is POSIX-compliant if you take out the stdbuf and $(nproc) parts.
Hey, since this thread has a load of shell scripting I figure it's the perfect place to publish my file upload script.
I've been working on it for a few hours a day these past 3 or so days as a study exercise, aswell as obviously the utility of such a script.
>>8685 It`s hard to take anything in this thread seriously when a Nanon`s only argument is (((Jews))) or "data mining thread," and no actual technical explanation on the subject matter at hand.
inb4
>Okay Mossad
>(((Jew))) >Oy vey
Am super Far Right. Thank you to the Nanons that did contribute, you`re appreciated!
>>9868 why not use and abuse gpg encrypted files placed on termbin? I reckon it even lets you upload files through tor. Everyone should public their private key use a work e-mail with a pgp signature, forcing normal-cattle to either accept it (and install enigmail plugin) or say fuck it and drop this medium entirely. It still puzzles me how come normal cattle so much "worried" about their privacy and secrecy carry their nigger-phones on them with always-on banking and other shit can't fathom that their e-mail passwords are easily breakable and all their private unencrypted info ought to be leaked.
Contributing to the thread. Downsample those 200MB pdfs. Ghostscript is required.
# pdfresize - downgrade pdf quality to 150 dpi
function pdfresize() {
INPUT=$1; OUTPUT=$2;
[ -z "$3" ] && QUALITY=ebook;
[ ! -z "$3" ] && QUALITY=$3;
ghostscript -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 -dPDFSETTINGS=/${QUALITY} \
-sOutputFile=${OUTPUT} ${INPUT}
}
Web browsers, operating systems, command line software, whatever else, if it has a config this is the place to share!
This is not only a thread to post your own config but also a place where to peer review other nanons configs and help others.
The purpose of using a dedicated thread instead of /Nano/g/QTDDTOT is to make it lurkable.
I will start with my own Firefox and Tor Browser user.js configuration when i finish reviewing it.