bson – BSON (Binary JSON) Encoding and Decoding — PyMongo ...

An introduction to Linux through Windows Subsystem for Linux

I'm working as an Undergraduate Learning Assistant and wrote this guide to help out students who were in the same boat I was in when I first took my university's intro to computer science course. It provides an overview of how to get started using Linux, guides you through setting up Windows Subsystem for Linux to run smoothly on Windows 10, and provides a very basic introduction to Linux. Students seemed to dig it, so I figured it'd help some people in here as well. I've never posted here before, so apologies if I'm unknowingly violating subreddit rules.

An introduction to Linux through Windows Subsystem for Linux

GitHub Pages link

Introduction and motivation

tl;dr skip to next section
So you're thinking of installing a Linux distribution, and are unsure where to start. Or you're an unfortunate soul using Windows 10 in CPSC 201. Either way, this guide is for you. In this section I'll give a very basic intro to some of options you've got at your disposal, and explain why I chose Windows Subsystem for Linux among them. All of these have plenty of documentation online so Google if in doubt.

Setting up WSL

So if you've read this far I've convinced you to use WSL. Let's get started with setting it up. The very basics are outlined in Microsoft's guide here, I'll be covering what they talk about and diving into some other stuff.

1. Installing WSL

Press the Windows key (henceforth Winkey) and type in PowerShell. Right-click the icon and select run as administrator. Next, paste in this command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart 
Now you'll want to perform a hard shutdown on your computer. This can become unecessarily complicated because of Window's fast startup feature, but here we go. First try pressing the Winkey, clicking on the power icon, and selecting Shut Down while holding down the shift key. Let go of the shift key and the mouse, and let it shutdown. Great! Now open up Command Prompt and type in
wsl --help 
If you get a large text output, WSL has been successfully enabled on your machine. If nothing happens, your computer failed at performing a hard shutdown, in which case you can try the age-old technique of just holding down your computer's power button until the computer turns itself off. Make sure you don't have any unsaved documents open when you do this.

2. Installing Ubuntu

Great! Now that you've got WSL installed, let's download a Linux distro. Press the Winkey and type in Microsoft Store. Now use the store's search icon and type in Ubuntu. Ubuntu is a Debian-based Linux distribution, and seems to have the best integration with WSL, so that's what we'll be going for. If you want to be quirky, here are some other options. Once you type in Ubuntu three options should pop up: Ubuntu, Ubuntu 20.04 LTS, and Ubuntu 18.04 LTS.
![Windows Store](https://theshepord.github.io/intro-to-WSL/docs/images/winstore.png) Installing plain-old "Ubuntu" will mean the app updates whenever a new major Ubuntu distribution is released. The current version (as of 09/02/2020) is Ubuntu 20.04.1 LTS. The other two are older distributions of Ubuntu. For most use-cases, i.e. unless you're running some software that will break when upgrading, you'll want to pick the regular Ubuntu option. That's what I did.
Once that's done installing, again hit Winkey and open up Ubuntu. A console window should open up, asking you to wait a minute or two for files to de-compress and be stored on your PC. All future launches should take less than a second. It'll then prompt you to create a username and password. I'd recommend sticking to whatever your Windows username and password is so that you don't have to juggle around two different usepassword combinations, but up to you.
Finally, to upgrade all your packages, type in
sudo apt-get update 
And then
sudo apt-get upgrade 
apt-get is the Ubuntu package manager, this is what you'll be using to install additional programs on WSL.

3. Making things nice and crispy: an introduction to UNIX-based filesystems

tl;dr skip to the next section
The two above steps are technically all you need for running WSL on your system. However, you may notice that whenever you open up the Ubuntu app your current folder seems to be completely random. If you type in pwd (for Print Working Directory, 'directory' is synonymous with 'folder') inside Ubuntu and hit enter, you'll likely get some output akin to /home/. Where is this folder? Is it my home folder? Type in ls (for LiSt) to see what files are in this folder. Probably you won't get any output, because surprise surprise this folder is not your Windows home folder and is in fact empty (okay it's actually not empty, which we'll see in a bit. If you type in ls -a, a for All, you'll see other files but notice they have a period in front of them. This is a convention for specifying files that should be hidden by default, and ls, as well as most other commands, will honor this convention. Anyways).
So where is my Windows home folder? Is WSL completely separate from Windows? Nope! This is Windows Subsystem for Linux after all. Notice how, when you typed pwd earlier, the address you got was /home/. Notice that forward-slash right before home. That forward-slash indicates the root directory (not to be confused with the /root directory), which is the directory at the top of the directory hierarchy and contains all other directories in your system. So if we type ls /, you'll see what are the top-most directories in your system. Okay, great. They have a bunch of seemingly random names. Except, shocker, they aren't random. I've provided a quick run-down in Appendix A.
For now, though, we'll focus on /mnt, which stands for mount. This is where your C drive, which contains all your Windows stuff, is mounted. So if you type ls /mnt/c, you'll begin to notice some familiar folders. Type in ls /mnt/c/Users, and voilà, there's your Windows home folder. Remember this filepath, /mnt/c/Users/. When we open up Ubuntu, we don't want it tossing us in this random /home/ directory, we want our Windows home folder. Let's change that!

4. Changing your default home folder

Type in sudo vim /etc/passwd. You'll likely be prompted for your Ubuntu's password. sudo is a command that gives you root privileges in bash (akin to Windows's right-click then selecting 'Run as administrator'). vim is a command-line text-editing tool, which out-of-the-box functions kind of like a crummy Notepad (you can customize it infinitely though, and some people have insane vim setups. Appendix B has more info). /etc/passwd is a plaintext file that historically was used to store passwords back when encryption wasn't a big deal, but now instead stores essential user info used every time you open up WSL.
Anyway, once you've typed that in, your shell should look something like this: ![vim /etc/passwd](https://theshepord.github.io/intro-to-WSL/docs/images/vim-etc-passwd.png)
Using arrow-keys, find the entry that begins with your Ubuntu username. It should be towards the bottom of the file. In my case, the line looks like
theshep:x:1000:1000:,,,:/home/pizzatron3000:/bin/bash 
See that cringy, crummy /home/pizzatron3000? Not only do I regret that username to this day, it's also not where we want our home directory. Let's change that! Press i to initiate vim's -- INSERT -- mode. Use arrow-keys to navigate to that section, and delete /home/ by holding down backspace. Remember that filepath I asked you to remember? /mnt/c/Users/. Type that in. For me, the line now looks like
theshep:x:1000:1000:,,,:/mnt/c/Users/lucas:/bin/bash 
Next, press esc to exit insert mode, then type in the following:
:wq 
The : tells vim you're inputting a command, w means write, and q means quit. If you've screwed up any of the above sections, you can also type in :q! to exit vim without saving the file. Just remember to exit insert mode by pressing esc before inputting commands, else you'll instead be writing to the file.
Great! If you now open up a new terminal and type in pwd, you should be in your Window's home folder! However, things seem to be lacking their usual color...

5. Importing your configuration files into the new home directory

Your home folder contains all your Ubuntu and bash configuration files. However, since we just changed the home folder to your Window's home folder, we've lost these configuration files. Let's bring them back! These configuration files are hidden inside /home/, and they all start with a . in front of the filename. So let's copy them over into your new home directory! Type in the following:
cp -r /home//. ~ 
cp stands for CoPy, -r stands for recursive (i.e. descend into directories), the . at the end is cp-specific syntax that lets it copy anything, including hidden files, and the ~ is a quick way of writing your home directory's filepath (which would be /mnt/c/Users/) without having to type all that in again. Once you've run this, all your configuration files should now be present in your new home directory. Configuration files like .bashrc, .profile, and .bash_profile essentially provide commands that are run whenever you open a new shell. So now, if you open a new shell, everything should be working normally. Amazing. We're done!

6. Tips & tricks

Here are two handy commands you can add to your .profile file. Run vim ~/.profile, then, type these in at the top of the .profile file, one per line, using the commands we discussed previously (i to enter insert mode, esc to exit insert mode, :wq to save and quit).
alias rm='rm -i' makes it so that the rm command will always ask for confirmation when you're deleting a file. rm, for ReMove, is like a Windows delete except literally permanent and you will lose that data for good, so it's nice to have this extra safeguard. You can type rm -f to bypass. Linux can be super powerful, but with great power comes great responsibility. NEVER NEVER NEVER type in rm -rf /, this is saying 'delete literally everything and don't ask for confirmation', your computer will die. Newer versions of rm fail when you type this in, but don't push your luck. You've been warned. Be careful.
export DISPLAY=:0 if you install XLaunch VcXsrv, this line allows you to open graphical interfaces through Ubuntu. The export sets the environment variable DISPLAY, and the :0 tells Ubuntu that it should use the localhost display.

Appendix A: brief intro to top-level UNIX directories

tl;dr only mess with /mnt, /home, and maybe maybe /usr. Don't touch anything else.
  • bin: binaries, contains Ubuntu binary (aka executable) files that are used in bash. Here you'll find the binaries that execute commands like ls and pwd. Similar to /usbin, but bin gets loaded earlier in the booting process so it contains the most important commands.
  • boot: contains information for operating system booting. Empty in WSL, because WSL isn't an operating system.
  • dev: devices, provides files that allow Ubuntu to communicate with I/O devices. One useful file here is /dev/null, which is basically an information black hole that automatically deletes any data you pass it.
  • etc: no idea why it's called etc, but it contains system-wide configuration files
  • home: equivalent to Window's C:/Users folder, contains home folders for the different users. In an Ubuntu system, under /home/ you'd find the Documents folder, Downloads folder, etc.
  • lib: libraries used by the system
  • lib64 64-bit libraries used by the system
  • mnt: mount, where your drives are located
  • opt: third-party applications that (usually) don't have any dependencies outside the scope of their own package
  • proc: process information, contains runtime information about your system (e.g. memory, mounted devices, hardware configurations, etc)
  • run: directory for programs to store runtime information.
  • srv: server folder, holds data to be served in protocols like ftp, www, cvs, and others
  • sys: system, provides information about different I/O devices to the Linux Kernel. If dev files allows you to access I/O devices, sys files tells you information about these devices.
  • tmp: temporary, these are system runtime files that are (in most Linux distros) cleared out after every reboot. It's also sort of deprecated for security reasons, and programs will generally prefer to use run.
  • usr: contains additional UNIX commands, header files for compiling C programs, among other things. Kind of like bin but for less important programs. Most of everything you install using apt-get ends up here.
  • var: variable, contains variable data such as logs, databases, e-mail etc, but that persist across different boots.
Also keep in mind that all of this is just convention. No Linux distribution needs to follow this file structure, and in fact almost all will deviate from what I just described. Hell, you could make your own Linux fork where /mnt/c information is stored in tmp.

Appendix B: random resources

EDIT: implemented various changes suggested in the comments. Thanks all!
submitted by HeavenBuilder to linux4noobs [link] [comments]

Hotfix modding tutorial! (Play Cartels today, or any event for that fact, or write your own buffs!)

OK, this is the definitive guide to pulling off a hotfix mod. It's not that hard, it just requires some basic knowledge of how to run a Linux program on Windows, and how to hex-patch an EXE.
First, some notes:
  1. Everything is going to be done from the Windows Subsystem for Linux. I recommend installing ArchWSL (not covered here) or some other up-to-date Linux miniroot and NOT using the Windows version of anything.
  2. This can be potentially dangerous, as you will be running a proxy. Make sure Windows Firewall is ON and blocking port 8080 inbound.
  3. I use 010 as my hex editor. Your mileage may vary. In theory you can write some regexes and use sed. I am working on a 5-line C program to patch the game for you.
Step 1 - installing mitmproxy.
After installing ArchWSL or the Linux distro of your choice on WSL, open up a Unix shell and install mitmproxy from the package repo. For Debian-based distros that's "apt install mitmproxy" and for Arch based distros that's "pacman -S mitmproxy". Once you've got it installed, execute the "mitmproxy" command. Doing so will generate the certificates. From there, open your Windows proxy settings and key in 127.0.0.1 port 8080 as the proxy. Then, open a browser like Edge and go to mitm.it. Download and install the .p12 certificate file. Click it, install on your local machine, and place it into Trusted Root Certification Authorities. Then, stop mitmproxy with a ^C (control-C) and a Y. Disable your proxy settings.
Step 2 - patching the game's EXE.
This is the somewhat tricky part. Make a backup of Borderlands3.exe before continuing. Seriously do it. After installing the trial version of 010 or buying it if you wish, you want to hit Control-F and select Options on the menu that comes up. Enable wildcard searches. Key in "41 39 28 ? ? ? 88 83 90 03" and make sure that it reports as such. Search for it. When you've found it, replace the contents at that address with "41 39 28 B0 00 90 88 83 90 03" and save. FYI the EXE is located at Borderlands 3\OakGame\Binaries\Win64\Borderlands3.exe. You can also use other hex editors, but they need to have a wildcard binary search feature. HxD doesn't have it, I'm afraid.
Step 3 - getting apocalyptech's GitHub repo.
Execute the following Unix command on your WSL: "git clone https://github.com/apocalyptech/bl3hotfixmodding.git". Change dir into that folder, and edit injectdata/modlist.txt. Comment out (put a # in front of every line that doesn't have one) the rest of the file. Then, search for the things you want to enable. Anything that you type into this file has to be the name of a .txt file in the injectdata dir, and will get sent to the game. Please read the readmes before trying to write your own hotfixes. Once you've selected the things you want to enable (one of interest might be cartels_enable).
Step 4 - start the proxy.
Run the following command: "mitmdump -s hfinject.py". Edit your proxy settings to re-enable the 127.0.0.1:8080 proxy, and make sure you can still browse the internet.
Step 5 - run the game.
Run the game however you launch it. If you have multiple monitors or a serial terminal on your desk, move the WSL console window/terminal session over to it. That way, you can make sure that you see a request to the GBX hotfix URL. Once the game starts, you should see the "hotfixes applied" sign and, if all is willing, your mods have should been activated. Now you can relive those April nights grinding Joey Ultraviolet for a Yellowcake and OPQ again! Have fun!
Notes:
Hotfixes aren't stored anywhere on disk. They are loaded in everytime the game starts. As such, it might be worth investing in a cheapo Unix machine (a RasPi will do just fine) to run mitmproxy 24/7 on. You have to hexedit the game's executable for one good reason: while the game respects the system proxy settings, it only half respects the system certificate settings. This edit removes the validity check from the game.
Disclaimer: I am not responsible if you screw up something. Do this at your own risk. Also, do not reverse engineer or mis-appropariate this game. Do not produce a "cracked" version of the game using a hex editor. In other words, "do the right thing" and you'll be fine. Do not sell modded items. Do not violate your EULA!
Edit: you can use HxD to patch your executable too. Just search for 88 83 90 03. When you find the occurrence, make sure the bytes around it are the right ones and make your edit manually. Thank you Lite_OnE for that input!
Credit:
I would like to thank apocalyptech, without their fine work we wouldn't have any of this! I would also like to thank lazyturtle, who showed me a wonderful one-line hex edit that completely removes the need for making certificates with a revocation chain built in to them. Huge timesaver. Thanks folks! Your work has really helped this community get the most out of this game!
submitted by hackersmacker to borderlands3 [link] [comments]

After effects crashing on startup

Hey folks I get the below error log when opening after effects. Can't get past it unless I uninstall . any ideas here? Keeps happening

submitted by Lolosdomore to AfterEffects [link] [comments]

An introduction to Linux through Windows Subsystem for Linux

I'm working as an Undergraduate Learning Assistant and wrote this guide to help out students who were in the same boat I was in when I first took my university's intro to computer science course. It provides an overview of how to get started using Linux, guides you through setting up Windows Subsystem for Linux to run smoothly on Windows 10, and provides a very basic introduction to Linux. Students seemed to dig it, so I figured it'd help some people in here as well. I've never posted here before, so apologies if I'm unknowingly violating subreddit rules.

Getting Windows Subsystem for Linux running smoothly on Windows 10

GitHub Pages link

Introduction and motivation

tl;dr skip to next section
So you're thinking of installing a Linux distribution, and are unsure where to start. Or you're an unfortunate soul using Windows 10 in CPSC 201. Either way, this guide is for you. In this section I'll give a very basic intro to some of options you've got at your disposal, and explain why I chose Windows Subsystem for Linux among them. All of these have plenty of documentation online so Google if in doubt.

Setting up WSL

So if you've read this far I've convinced you to use WSL. Let's get started with setting it up. The very basics are outlined in Microsoft's guide here, I'll be covering what they talk about and diving into some other stuff.

1. Installing WSL

Press the Windows key (henceforth Winkey) and type in PowerShell. Right-click the icon and select run as administrator. Next, paste in this command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart 
Now you'll want to perform a hard shutdown on your computer. This can become unecessarily complicated because of Window's fast startup feature, but here we go. First try pressing the Winkey, clicking on the power icon, and selecting Shut Down while holding down the shift key. Let go of the shift key and the mouse, and let it shutdown. Great! Now open up Command Prompt and type in
wsl --help 
If you get a large text output, WSL has been successfully enabled on your machine. If nothing happens, your computer failed at performing a hard shutdown, in which case you can try the age-old technique of just holding down your computer's power button until the computer turns itself off. Make sure you don't have any unsaved documents open when you do this.

2. Installing Ubuntu

Great! Now that you've got WSL installed, let's download a Linux distro. Press the Winkey and type in Microsoft Store. Now use the store's search icon and type in Ubuntu. Ubuntu is a Debian-based Linux distribution, and seems to have the best integration with WSL, so that's what we'll be going for. If you want to be quirky, here are some other options. Once you type in Ubuntu three options should pop up: Ubuntu, Ubuntu 20.04 LTS, and Ubuntu 18.04 LTS.
![Windows Store](https://theshepord.github.io/intro-to-WSL/docs/images/winstore.png) Installing plain-old "Ubuntu" will mean the app updates whenever a new major Ubuntu distribution is released. The current version (as of 09/02/2020) is Ubuntu 20.04.1 LTS. The other two are older distributions of Ubuntu. For most use-cases, i.e. unless you're running some software that will break when upgrading, you'll want to pick the regular Ubuntu option. That's what I did.
Once that's done installing, again hit Winkey and open up Ubuntu. A console window should open up, asking you to wait a minute or two for files to de-compress and be stored on your PC. All future launches should take less than a second. It'll then prompt you to create a username and password. I'd recommend sticking to whatever your Windows username and password is so that you don't have to juggle around two different usepassword combinations, but up to you.
Finally, to upgrade all your packages, type in
sudo apt-get update 
And then
sudo apt-get upgrade 
apt-get is the Ubuntu package manager, this is what you'll be using to install additional programs on WSL.

3. Making things nice and crispy: an introduction to UNIX-based filesystems

tl;dr skip to the next section
The two above steps are technically all you need for running WSL on your system. However, you may notice that whenever you open up the Ubuntu app your current folder seems to be completely random. If you type in pwd (for Present Working Directory, 'directory' is synonymous with 'folder') inside Ubuntu and hit enter, you'll likely get some output akin to /home/. Where is this folder? Is it my home folder? Type in ls (for LiSt) to see what files are in this folder. Probably you won't get any output, because surprise surprise this folder is not your Windows home folder and is in fact empty (okay it's actually not empty, which we'll see in a bit. If you type in ls -a, a for All, you'll see other files but notice they have a period in front of them, which tells bash that they should be hidden by default. Anyways).
So where is my Windows home folder? Is WSL completely separate from Windows? Nope! This is Windows Subsystem for Linux after all. Notice how, when you typed pwd earlier, the address you got was /home/. Notice that forward-slash right before home. That forward-slash indicates the root directory (not to be confused with the /root directory), which is the directory at the top of the directory hierarchy and contains all other directories in your system. So if we type ls /, you'll see what are the top-most directories in your system. Okay, great. They have a bunch of seemingly random names. Except, shocker, they aren't random. I've provided a quick run-down in Appendix A.
For now, though, we'll focus on /mnt, which stands for mount. This is where your C drive, which contains all your Windows stuff, is mounted. So if you type ls /mnt/c, you'll begin to notice some familiar folders. Type in ls /mnt/c/Users, and voilà, there's your Windows home folder. Remember this filepath, /mnt/c/Users/. When we open up Ubuntu, we don't want it tossing us in this random /home/ directory, we want our Windows home folder. Let's change that!

4. Changing your default home folder

Type in sudo vim /etc/passwd. You'll likely be prompted for your Ubuntu's password. sudo is a command that gives you root privileges in bash (akin to Windows's right-click then selecting 'Run as administrator'). vim is a command-line text-editing tool, kinda like an even crummier Notepad, which is a pain to use at first but bear with me and we can pull through. /etc/passwd is a plaintext file that does not store passwords, as the name would suggest, but rather stores essential user info used every time you open up WSL.
Anyway, once you've typed that in, your shell should look something like this: ![vim /etc/passwd](https://theshepord.github.io/intro-to-WSL/docs/images/vim-etc-passwd.png)
Using arrow-keys, find the entry that begins with your Ubuntu username. It should be towards the bottom of the file. In my case, the line looks like
theshep:x:1000:1000:,,,:/home/pizzatron3000:/bin/bash 
See that cringy, crummy /home/pizzatron3000? Not only do I regret that username to this day, it's also not where we want our home directory. Let's change that! Press i to initiate vim's -- INSERT -- mode. Use arrow-keys to navigate to that section, and delete /home/ by holding down backspace. Remember that filepath I asked you to remember? /mnt/c/Users/. Type that in. For me, the line now looks like
theshep:x:1000:1000:,,,:/mnt/c/Users/lucas:/bin/bash 
Next, press esc to exit insert mode, then type in the following:
:wq 
The : tells vim you're inputting a command, w means write, and q means quit. If you've screwed up any of the above sections, you can also type in :q! to exit vim without saving the file. Just remember to exit insert mode by pressing esc before inputting commands, else you'll instead be writing to the file.
Great! If you now open up a new terminal and type in pwd, you should be in your Window's home folder! However, things seem to be lacking their usual color...

5. Importing your configuration files into the new home directory

Your home folder contains all your Ubuntu and bash configuration files. However, since we just changed the home folder to your Window's home folder, we've lost these configuration files. Let's bring them back! These configuration files are hidden inside /home/, and they all start with a . in front of the filename. So let's copy them over into your new home directory! Type in the following:
cp -r /home//* ~ 
cp stands for CoPy, -r stands for recursive (i.e. descend into directories), the * is a Kleene Star and means "grab everything that's here", and the ~ is a quick way of writing your home directory's filepath (which would be /mnt/c/Users/) without having to type all that in again. Once you've run this, all your configuration files should now be present in your new home directory. Configuration files like .bashrc, .profile, and .bash_profile essentially provides commands that are run whenever you open a new shell. So now, if you open a new shell, everything should be working normally. Amazing. We're done!

6. Tips & tricks

Here are two handy commands you can add to your .profile file. Run vim ~/.profile, then, type these in at the top of the .profile file, one per line, using the commands we discussed previously (i to enter insert mode, esc to exit insert mode, :wq to save and quit).
alias rm='rm -i' makes it so that the rm command will always ask for confirmation when you're deleting a file. rm, for ReMove, is like a Windows delete except literally permanent and you will lose that data for good, so it's nice to have this extra safeguard. You can type rm -f to bypass. Linux can be super powerful, but with great power comes great responsibility. NEVER NEVER NEVER type in rm -rf /, this is saying 'delete literally everything and don't ask for confirmation', your computer will die. You've been warned. Be careful.
export DISPLAY=:0 if you install XLaunch VcXsrv, this line allows you to open graphical interfaces through Ubuntu. The export sets the environment variable DISPLAY, and the :0 tells Ubuntu that it should use the localhost display.

Appendix A: overview of top-level UNIX directories

tl;dr only mess with /mnt, /home, and maybe maybe /usr. Don't touch anything else.
  • bin: binaries, contains Ubuntu binary (aka executable) files that are used in bash. Here you'll find the binaries that execute commands like ls and pwd. Similar to /usbin, but bin gets loaded earlier in the booting process so it contains the most important commands.
  • boot: contains information for operating system booting. Empty in WSL, because WSL isn't an operating system.
  • dev: devices, contains information for Ubuntu to communicate with I/O devices. One useful file here is /dev/null, which is basically an information black hole that automatically deletes any data you pass it.
  • etc: no idea why it's called etc, but it contains system-wide configuration files
  • home: equivalent to Window's C:/Users folder, contains home folders for the different users. In an Ubuntu system, under /home/ you'd find the Documents folder, Downloads folder, etc.
  • lib: libraries used by the system
  • lib64 64-bit libraries used by the system
  • mnt: mount, where your drives are located
  • opt: third-party applications that don't have any dependencies outside the scope of their own package
  • proc: process information, contains details about your Linux system, kind of like Windows's C:/Windows folder
  • run: directory for programs to store runtime information. Similarly to /bin vs /usbin, run has the same function as /varun, but gets loaded sooner in the boot process.
  • srv: server folder, holds data to be served in protocols like ftp, www, cvs, and others
  • sys: system, used by the Linux kernel to set or obtain information about the host system
  • tmp: temporary, runtime files that are cleared out after every reboot. Kinda like RAM in that way.
  • usr: contains additional UNIX commands, header files for compiling C programs, among other things. Most of everything you install using apt-get ends up here.
  • var: variable, contains variable data such as logs, databases, e-mail etc, but that persist across different boots.

Appendix B: random resources

submitted by HeavenBuilder to learnprogramming [link] [comments]

Can't install: "pihole-FTL: no process found" and "DNS service is NOT running"

Hi, I'm having problems installing pihole on a raspberry pi.
I installed using method 2:
wget -O basic-install.sh https://install.pi-hole.net sudo bash basic-install.sh
The dashboard says DNS Service is not running.
Here is the output from pihole -r:
 [✓] Root user check .;;,. .ccccc:,. :cccclll:. ..,, :ccccclll. ;ooodc 'ccll:;ll .oooodc .;cll.;;looo:. .. ','. .',,,,,,'. .',,,,,,,,,,. .',,,,,,,,,,,,.... ....''',,,,,,,'....... ......... .... ......... .......... .......... .......... .......... ......... .... ......... ........,,,,,,,'...... ....',,,,,,,,,,,,. .',,,,,,,,,'. .',,,,,,'. ..'''. [i] Existing PHP installation detected : PHP version 7.3.14-1~deb10u1 [i] Repair option selected [✓] Disk space check [✓] Update local cache of available packages [✓] Checking apt-get for upgraded packages... up to date! [i] Installer Dependency checks... [✓] Checking for dhcpcd5 [✓] Checking for git [✓] Checking for iproute2 [✓] Checking for whiptail [i] SELinux not detected [i] Performing reconfiguration, skipping download of local repos [✓] Resetting repository within /etc/.pihole... [✓] Resetting repository within /vawww/html/admin... [i] Main Dependency checks... [✓] Checking for cron [✓] Checking for curl [✓] Checking for dnsutils [✓] Checking for iputils-ping [✓] Checking for lsof [✓] Checking for netcat [✓] Checking for psmisc [✓] Checking for sudo [✓] Checking for unzip [✓] Checking for wget [✓] Checking for idn2 [✓] Checking for sqlite3 [✓] Checking for libcap2-bin [✓] Checking for dns-root-data [✓] Checking for libcap2 [✓] Checking for lighttpd [✓] Checking for php7.3-common [✓] Checking for php7.3-cgi [✓] Checking for php7.3-sqlite3 [✓] Checking for php7.3-xml [✓] Checking for php-intl [✓] Enabling lighttpd service to start on reboot... [✓] Checking for user 'pihole' [i] FTL Checks... [✓] Detected ARM-hf architecture (armv6 or lower) Using ARM binary [i] Checking for existing FTL binary... [i] Latest FTL Binary already installed (v5.0). Confirming Checksum... [i] Checksum correct. No need to download! perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_TERMINAL = "iTerm2", LC_CTYPE = "UTF-8", LANG = "en_GB.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_GB.UTF-8"). [✓] Installing scripts from /etc/.pihole [i] Installing configs from /etc/.pihole... [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone! [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf [i] Installing blocking page... [✓] Creating directory for blocking page, and copying files [i] Backing up index.lighttpd.html No default index.lighttpd.html file found... not backing up [✓] Installing sudoer file [✓] Installing latest Cron script [✓] Installing latest logrotate script [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old [✓] man pages installed and database updated [i] Testing if systemd-resolved is enabled [i] Systemd-resolved is not enabled [✓] Restarting lighttpd service... [✓] Enabling lighttpd service to start on reboot... [i] Restarting services... [✓] Enabling pihole-FTL service to start on reboot... [✓] Restarting pihole-FTL service... [✓] Deleting existing list cache [i] Neutrino emissions detected... [✓] Pulling blocklist source list into range [✓] Preparing new gravity database [i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/mastehosts [✓] Status: Retrieval successful [i] Received 57671 domains [i] Target: https://mirror1.malwaredomains.com/files/justdomains [✓] Status: Retrieval successful [i] Received 26853 domains [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt [✓] Status: Retrieval successful [i] Received 34 domains [i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt [✓] Status: Retrieval successful [i] Received 2701 domains [✓] Storing downloaded domains in new gravity database [✓] Building tree [✓] Swapping databases [i] Number of gravity domains: 87259 (84818 unique domains) [i] Number of exact blacklisted domains: 0 [i] Number of regex blacklist filters: 0 [i] Number of exact whitelisted domains: 0 [i] Number of regex whitelist filters: 0 [✗] pihole-FTL: no process found [✓] Cleaning up stray matter [✓] Restarting DNS server [✗] DNS service is NOT running [i] The install log is located at: /etc/pihole/install.log Update Complete! Current Pi-hole version is v5.0. Current AdminLTE version is v5.0. Current FTL version is v5.0. 
I tried apt-get upgrade and uninstalling and reinstalling a few times. Searching for the error all I find are old posts and the solutions don't seem to work.
What logs would I need to look?
Edit: debug token: k87a8bs9jb
submitted by andres_i to pihole [link] [comments]

Looking for practice? Want to expand your AHK knowledge? I got you covered.

I made a reply a while ago to Swaggurttt (could you give us an update of how things have been going?)
He wanted to learn more about AHK. So I provided him a list of new things to learn past just "press button > send keys".
Hopefully, some people reading will take this opportunity to branch out and learn some new things that AHK is capable of. From stepping into the aesthetically pleasing world of GUIs to using RegEx to become a string manipulating master. From braving the cryptic DllCall() command that lets you embrace code from other files thus making your scripts much more robust and useful, to having a whole slew of problems and puzzles that will test your ability to utilize AHK's capabilities.

Practice, Problems, and Challenges - It's like fun homework

Let's start with 4 websites that will give you tons of practice. From easy to insanely difficult. Between these 4 sites, you should have more things to do than you could ever finish.
Code Abbey
The site I've spent the most time on. From the easiest "add two variables" all the way to "write an AI". It's a good place to learn core programming skills and develop logic. Parsing through data, calculating variables, using arrays, etc...
Funny thing is this website is the reason I'm making this post. It has been a while since I used this site and I couldn't remember the address. So I looked up this post and...here we are!
Rosetta Code
Another good site, though I like Code Abbey's layout, sorting, and input/output method more. Rosetta has its own pros, like showing you solutions in TONS of different languages. Very helpful if you're familiar with other programming languages.
Code Chef
This was suggested to me a while ago and I've only done a couple of problems. Not because it's a bad site, but because I just haven't had the time to try and nuke the list. I figured it was worth including.
Those 3 should keep you busy for quite some time. Plus...
The AHK Subreddit
This subreddit is a treasure trove of problems! I used to spend a ton of time just trying other people's problems, coming up with my own solutions, and comparing what I come up with to others. You can learn a TON doing it this way. And comparing answers afterward only teaches you newer and better ways of doing things. Consider the unbelievable amount of backlogged posts you can go through. Years and years worth.

How about some suggestions for parts of AHK to learn?

RegEx (Regular Expressions) - Master of Strings

This is a mini-language for manipulating strings. Learn it! If there's a discernible pattern to what you're looking for, you definitely can write a RegEx to find it. See: RegExMatch and RegExReplace. Bonus: It should be noted that RegEx is its own little mini-language with its own rules and syntax. BUT, once you learn it, you now know it for almost every other programming language (minus some discrepancies between flavors).
RegEx Resources:

COMs - Letting you interface with other shit one command at a time!

COMs are pretty amazing. They let you interact with lots of different things on windows. Microsoft lets you access things like Internet Explorer, Excel, Word, Access, (literally the entire office suite), shell, WIN HTTP, VBScript, etc... It lets you use those programs directly from AHK. This increases reliability near infinitesimally compared to blind clicking and typing. You can web scrape like a boss using the IE COM. You can manipulate Excel spreadsheets, get data from them, update them, and whatever else you want. COMs are handy.
Resources:
There are also quite a few videos on YouTube that you can also check out.

GUIs - I feel pretty. Oh so pretty....

Learn to make and manipulate Graphical User Interfaces or GUIs. When you want user-friendly interaction with the users of your code, GUIs can be the perfect answer. A non-programmer isn't going to want to run scripts with switches or open up .ahk file or edit code to change settings. Enter the GUI!
The "Read This Before Posting!" stickied tutorial post has some good WYSIWYG suggestions. And it stands for What You See Is What You Get...that's really what they're called. Personally, I'm a fan of GUI Creator by Maestrith.
You'll spend a LOT of time trying to learn all the different things GUIs can do.
The AHK docs are the go-to for this stuff. Here are the pages you'll be visiting quite often:
I'd like to add a neat method I've started doing for tracking elements because it used to be a struggle for me. When I create a GUI, I like to keep everything inside of functions and I really don't want to create global variables for everything. I find myself making a single global Object in the AES. Then, whenever I create a GUI element, I always add the hwnd option to it and then immediately save that HWND to the array. Plus, you can logically name it so it's much easier to recall.
Example:
Global guiHwnd := {} NewGUI() MsgBox, % "Cancel Btn: " guiHwnd.CancelBtn "`nOK Btn: " guiHwnd.OKBtn ExitApp NewGUI(){ Gui, New Gui, Add, Button, hwndBtn gOKBtn, OK guiHwnd.okBtn := btn Gui, Add, Button, hwndBtn gCancelBtn, Cancel guiHwnd.cancelBtn := btn Gui, Show Return } 
GUIs are an excellent segue into DllCalls. Why? Because DllCall can let you fine-tune a GUI.

DllCall - Rule #1 of coding: Don't reinvent the wheel!

One thing we learn real quick in programming is you don't rewrite code that's already been created and thoroughly tested. It's a waste of time! That's why people will bundle up their code into these neat packages called DLLs (Dynamic Link Libraries) and then publish them for others to use. These let you call commands and functions outside of the native AHK language. Meaning you can interact with Window's internal functions directly from your script! This opens up a TON of possibilities for any script and unlocks some of the restrictions that come with AHK. Like changing things about GUIs that AHK doesn't have an option for. Or getting info directly from the operating system because we don't have an AHK command or function created to do so.
It's not just limited to Windows functions. It can access any DLL. As long as you know how to interface with it.
This MSDN link has a top-level link to all of the core things you need to learn about DLLCalling to windows.

GDI+ - Giving you the ability to create and manipulate graphics on the Windows level

GDI is Window's Graphics Device Interface. A user named Tic (Tariq Porter) wrote GDI+ for AHK. It handles ALL the DllCalls you need to make to the GDI to manipulate graphics, draw shapes and objects, import pictures, etc. You know all the stuff you can do in Paint? You can do ALL that anywhere at any time on the screen using AHK & GDIP. Without having to ever load Paint. Please note the GDI+ repo also includes tutorials on how to use the library. It doesn't cover everything quite as in-depth as I'd like it to, but the examples will give you plenty to go off of.
Why are you still reading this? You should have gotten distracted way up top and started trying stuff on Code Abbey!
OK, one challenge I always like to give people.
Recreate the Window's calculator. And make it work exactly the same. Initially, it sounds easy! But, duplicating the functionality AND the aesthetics can be pretty tricky. This is actually a tough challenge with lots of parts. You'll have to make a GUI that looks as close as possible to calc.exe. Make the display function the same, make every button work correctly, calculations should work, memory buttons should function, etc. Don't forget to make an icon for it and also to disable the AHK system tray icon, just like the real thing. Oh! And recreate the menu, too. This will give you practice on TONS of different aspects. It's complex enough to be challenging but not so complex no one would ever want to do it.
If you can get this done and want to extend things further, try making the scientific version of the calculator!! There's a real challenge. The extra advanced math buttons each have to work correctly.
Go, try, learn. If you get stuck, come back to the sub and ask for help. Or hit up the Discord crew. While you're waiting for an answer, you can always go through some of the current questions on the sub.
I hope you guys enjoy this post.
submitted by GroggyOtter to AutoHotkey [link] [comments]

Can't Access Admin Interface

I have had Pihole and Wireguard running on Digital Ocean droplet for quite a while. Today, I decided to upgrade Pihole to Version 5 and after doing so, it seems that am no longer able to access the admin interface.
Both pihole and WG appear to be operating correctly as when I turn off the VPN connection on my phone I start to see ads appearing in certain apps (they disappear when I restore the VPN). In addition to updating to V5 I also ran pihole - r as I wanted to revert to using the default block-lists. I specified the WG0 interface for Pihole to listen on when I reconfigured (see below). Was this correct?
Can anyone shed some insight into why I'm unable to access the admin interface?

[i] Existing PHP installation detected : PHP version 7.2.24-0ubuntu0.18.04.4
[i] Reconfigure option selected
[✓] Disk space check
[✓] Update local cache of available packages
[✓] Checking apt-get for upgraded packages... up to date!
[i] Installer Dependency checks...
[✓] Checking for dhcpcd5
[✓] Checking for git
[✓] Checking for iproute2
[✓] Checking for whiptail
[i] SELinux not detected
[i] Using interface: wg0
[i] Using upstream DNS: DNS.WATCH (84.200.69.80, 84.200.70.40)
[i] Static IP already configured
[i] Found IPv6 ULA address, using it for blocking IPv6 ads
[i] IPv4 address: xxxxxxxxxxxxxxxx
[i] IPv6 address: xxxxxxxxxxxxxxx
[i] Web Interface On
[i] Web Server On
[i] Logging On.
[i] Privacy level 0 [i] Performing reconfiguration, skipping download of local repos
[✓] Resetting repository within /etc/.pihole...
[✓] Resetting repository within /vawww/html/admin...
[i] Main Dependency checks...
[✓] Checking for cron
[✓] Checking for curl
[✓] Checking for dnsutils
[✓] Checking for iputils-ping
[✓] Checking for lsof
[✓] Checking for netcat
[✓] Checking for psmisc
[✓] Checking for sudo
[✓] Checking for unzip
[✓] Checking for wget
[✓] Checking for idn2
[✓] Checking for sqlite3
[✓] Checking for libcap2-bin
[✓] Checking for dns-root-data
[✓] Checking for libcap2
[✓] Checking for lighttpd
[✓] Checking for php7.2-common
[✓] Checking for php7.2-cgi
[✓] Checking for php7.2-sqlite3
[✓] Checking for php7.2-xml
[✓] Checking for php-intl
[✓] Enabling lighttpd service to start on reboot...
[✓] Checking for user 'pihole'
[i] FTL Checks...
[✓] Detected x86_64 architecture
[i] Checking for existing FTL binary...
[i] Latest FTL Binary already installed (v5.0). Confirming Checksum...
[i] Checksum correct. No need to download!
[✓] Installing scripts from /etc/.pihole
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
[i] Installing blocking page...
[✓] Creating directory for blocking page, and copying files
[i] Backing up index.lighttpd.html
No default index.lighttpd.html file found... not backing up
[✓] Installing sudoer file
[✓] Installing latest Cron script
[✓] Installing latest logrotate script
[i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old
[✓] man pages installed and database updated
[i] Testing if systemd-resolved is enabled
[i] Systemd-resolved does not need to be restarted
[✓] Restarting lighttpd service...
[✓] Enabling lighttpd service to start on reboot...
[i] Restarting services...
[✓] Enabling pihole-FTL service to start on reboot...
[✓] Restarting pihole-FTL service...
[✓] Deleting existing list cache
[i] Neutrino emissions detected...
[✓] Pulling blocklist source list into range
[✓] Preparing new gravity database
[i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/mastehosts
[✓] Status: Retrieval successful
[i] Received 57671 domains
[i] Target: https://mirror1.malwaredomains.com/files/justdomains
[✓] Status: Retrieval successful
[i] Received 26853 domains
[i] Target: http://sysctl.org/cameleon/hosts
[✓] Status: Retrieval successful
[i] Received 20567 domains
[i] Target: https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
[✓] Status: Retrieval successful
[i] Received 0 domains
[i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
[✓] Status: Retrieval successful
[i] Received 34 domains
[i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
[✓] Status: Retrieval successful
[i] Received 2701 domains
[i] Target: ttps://v.firebog.net/hosts/AdguardDNS.txt
[✗] Status: Connection Refused
[✗] List download failed: no cached list available
[i] Target: ttps://v.firebog.net/hosts/Easyprivacy.txt
[✗] Status: Connection Refused
[✗] List download failed: no cached list available
[i] Target: https://v.firebog.net/hosts/Prigent-Ads.txt
[✓] Status: Retrieval successful
[i] Received 3670 domains
[i] Target: https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/masteSmartTV.txt
[✓] Status: Retrieval successful
[i] Received 197 domains
[i] Target: https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/masteAmazonFireTV.txt
[✓] Status: Retrieval successful
[i] Received 17 domains
[i] Target: https://v.firebog.net/hosts/Prigent-Malware.txt
[✓] Status: Retrieval successful
[i] Received 53095 domains
[i] Target: https://mirror.cedia.org.ec/malwaredomains/immortal_domains.txt
[✓] Status: Retrieval successful
[i] Received 3196 domains
[i] Target: https://www.malwaredomainlist.com/hostslist/hosts.txt
[✓] Status: Retrieval successful
[i] Received 1104 domains
[i] Target: https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt
[✓] Status: Retrieval successful
[i] Received 134925 domains
[i] Target: https://raw.githubusercontent.com/anudeepND/blacklist/masteadservers.txt
[✓] Status: Retrieval successful
[i] Received 42594 domains
[i] Target: https://v.firebog.net/hosts/static/SamsungSmart.txt
[✓] Status: Retrieval successful
[i] Received 60 domains
[✓] Storing downloaded domains in new gravity database
[✓] Building tree
[✓] Swapping databases
[i] Number of gravity domains: 346684 (297043 unique domains)
[i] Number of exact blacklisted domains: 34
[i] Number of regex blacklist filters: 24
[i] Number of exact whitelisted domains: 265
[i] Number of regex whitelist filters: 0
[✓] Flushing DNS cache
[✓] Cleaning up stray matter
[✓] DNS service is running
[✓] Pi-hole blocking is Enabled
[i] View the web interface at http://pi.hole/admin or http:/xx.xx.xx.xx/admin
[i] You may now configure your devices to use the Pi-hole as their DNS server
[i] Pi-hole DNS (IPv4): xxxxxxxxxxxx
[i] Pi-hole DNS (IPv6): xxxxxxxxxxxxx
[i] If you set a new IP address, please restart the server running the Pi-hole
[i] The install log is located at: /etc/pihole/install.log
submitted by GentleSoul22 to pihole [link] [comments]

Problem running php on nginx ubuntu (files get downloaded)

Hi everyone,
I'm very new to php and ran into some issue that I have been trying to fix for a couple of hours.
I have setup Nginx on ubuntu 19.10, and installed php7.4-fpm. But whenever I try to open a file like index.php, located in my root folder /vawww/html (so localhost/index.php) it will download the file instead of running it.
Nginx is not communicating with php7.4-fpm, is my guess, but I can not find the mistake in my configuration files..

Could anyone take a look and spot what would be wrong.
Below I've put the files, in order
  1. /etc/nginx/fastcgi.conf:
  2. /etc/nginx/fastcgi_params:
  3. /etc/nginx/sites-enabled/server.conf
  4. /etc/nginx/mime.types
  5. /etc/php/7.4/fpm/php-fpm.conf
  6. /etc/php/7.4/fpm/pool.d/www.conf
  7. selection of /etc/php/7.4/fpm/php.ini since posting it all is too long
  8. output service nginx status & service php7.4-fpm status

If I'm looking at the wrong files or something and the error could be located elsewhere please guide me in the right direction.
And if you already read this far, I would like to thank you for your time!

1/etc/nginx/fastcgi.conf:


fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param REQUEST_SCHEME $scheme; fastcgi_param HTTPS $https if_not_empty; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; 

2. /etc/nginx/fastcgi_params:

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param REQUEST_SCHEME $scheme; fastcgi_param HTTPS $https if_not_empty; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; 

3. /etc/nginx/sites-enabled/server.conf

# Version=2.1 server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; # # This file will be managed by ATK, and overwitten without warning. # # To enable external access please consider installing DuckDNS using ATK. # # For external access using a custom domain: # # 1) Make a copy of this file and rename it to match your domain # # ex: /etc/nginx/sites-available/mydomain.com.conf # # 2) Edit your file and replace the entire `server_name` line with `server_name mydomain.com;` # # (do not include IP addresses) # # 3) Run `sudo ln -s /etc/nginx/sites-available/mydomain.com.conf /etc/nginx/sites-enabled/mydomain.com.conf` # # 4) Run `sudo systemctl reload nginx` # # You can then use ATK to run Certbot on your custom domain for HTTPS # # You can also modify your new file to enabling some of the extra features below by uncommenting the lines # # If you modify your file you will need to rerun the command in step 4 above server_name 127.0.0.1 localhost 192.168.1.248 0.0.0.0; access_log /valog/nginx/server.atomic.access.log; error_log /valog/nginx/server.atomic.error.log; index index.html index.php; root /vawww/html/; client_body_buffer_size 128k; client_max_body_size 100M; send_timeout 5m; server_tokens off; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/varun/php7.4-fpm.sock; fastcgi_index index.php; include fastcgi.conf;} location ~ /\.ht { deny all; } ## # Snippet Config ## include /etc/nginx/snippets/gzip.atomic.conf; # include /etc/nginx/snippets/headers-hsts.atomic.conf; # WARNING: Only enable Strict Transport after confirming HTTPS is working include /etc/nginx/snippets/headers.atomic.conf; # include /etc/nginx/snippets/https-redirect.atomic.conf; # WARNING: Only enable HTTPS Redirect after confirming HTTPS is working include /etc/nginx/snippets/letsencrypt.atomic.conf; include /etc/nginx/snippets/proxy.atomic.conf; # include /etc/nginx/snippets/ssl-dhparam.atomic.conf; # WARNING: Only enable dhparam after running `openssl dhparam -out /etc/nginx/dhparam.pem 4096` include /etc/nginx/snippets/ssl.atomic.conf; ## # App Location Config ## include /etc/nginx/locations-enabled/*.atomic.conf; ssl_certificate /etc/letsencrypt/live/****/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/****/privkey.pem; # managed by Certbot } 

4. /etc/nginx/mime.types

types { text/html html htm shtml; text/css css; text/xml xml; image/gif gif; image/jpeg jpeg jpg; application/javascript js; application/atom+xml atom; application/rss+xml rss; text/mathml mml; text/plain txt; text/vnd.sun.j2me.app-descriptor jad; text/vnd.wap.wml wml; text/x-component htc; image/png png; image/tiff tif tiff; image/vnd.wap.wbmp wbmp; image/x-icon ico; image/x-jng jng; image/x-ms-bmp bmp; image/svg+xml svg svgz; image/webp webp; application/font-woff woff; application/java-archive jar war ear; application/json json; application/mac-binhex40 hqx; application/msword doc; application/pdf pdf; application/postscript ps eps ai; application/rtf rtf; application/vnd.apple.mpegurl m3u8; application/vnd.ms-excel xls; application/vnd.ms-fontobject eot; application/vnd.ms-powerpoint ppt; application/vnd.wap.wmlc wmlc; application/vnd.google-earth.kml+xml kml; application/vnd.google-earth.kmz kmz; application/x-7z-compressed 7z; application/x-cocoa cco; application/x-java-archive-diff jardiff; application/x-java-jnlp-file jnlp; application/x-makeself run; application/x-perl pl pm; application/x-pilot prc pdb; application/x-rar-compressed rar; application/x-redhat-package-manager rpm; application/x-sea sea; application/x-shockwave-flash swf; application/x-stuffit sit; application/x-tcl tcl tk; application/x-x509-ca-cert der pem crt; application/x-xpinstall xpi; application/xhtml+xml xhtml; application/xspf+xml xspf; application/zip zip; application/octet-stream bin exe dll; application/octet-stream deb; application/octet-stream dmg; application/octet-stream iso img; application/octet-stream msi msp msm; application/vnd.openxmlformats-officedocument.wordprocessingml.document docx; application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx; application/vnd.openxmlformats-officedocument.presentationml.presentation pptx; audio/midi mid midi kar; audio/mpeg mp3; audio/ogg ogg; audio/x-m4a m4a; audio/x-realaudio ra; video/3gpp 3gpp 3gp; video/mp2t ts; video/mp4 mp4; video/mpeg mpeg mpg; video/quicktime mov; video/webm webm; video/x-flv flv; video/x-m4v m4v; video/x-mng mng; video/x-ms-asf asx asf; video/x-ms-wmv wmv; video/x-msvideo avi; } 

5. /etc/php/7.4/fpm/php-fpm.conf

;;;;;;;;;;;;;;;;;;;;; ; FPM Configuration ; ;;;;;;;;;;;;;;;;;;;;; ; All relative paths in this configuration file are relative to PHP's install ; prefix (/usr). This prefix can be dynamically changed by using the ; '-p' argument from the command line. ;;;;;;;;;;;;;;;;;; ; Global Options ; ;;;;;;;;;;;;;;;;;; [global] ; Pid file ; Note: the default prefix is /var ; Default Value: none ; Warning: if you change the value here, you need to modify systemd ; service PIDFile= setting to match the value here. pid = /run/php/php7.4-fpm.pid ; Error log file ; If it's set to "syslog", log is sent to syslogd instead of being written ; into a local file. ; Note: the default prefix is /var ; Default Value: log/php-fpm.log error_log = /valog/php7.4-fpm.log ;syslog.facility = daemon ;syslog.ident = php-fpm ;log_level = notice ;log_limit = 4096 ;log_buffering = no ;emergency_restart_threshold = 0 ;emergency_restart_interval = 0 ;process_control_timeout = 0 ; process.max = 128 ; process.priority = -19 ; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. ; Default Value: yes ;daemonize = yes ;rlimit_files = 1024 ;rlimit_core = 0 ;events.mechanism = epoll ; When FPM is built with systemd integration, specify the interval, ; in seconds, between health report notification to systemd. ; Set to 0 to disable. ; Available Units: s(econds), m(inutes), h(ours) ; Default Unit: seconds ; Default value: 10 ;systemd_interval = 10 ;;;;;;;;;;;;;;;;;;;; ; Pool Definitions ; ;;;;;;;;;;;;;;;;;;;; ; Multiple pools of child processes may be started with different listening ; ports and different management options. The name of the pool will be ; used in logs and stats. There is no limitation on the number of pools which ; FPM can handle. Your system will tell you anyway :) ; Include one or more files. If glob(3) exists, it is used to include a bunch of ; files from a glob(3) pattern. This directive can be used everywhere in the ; file. ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr otherwise include=/etc/php/7.4/fpm/pool.d/*.conf 

6. /etc/php/7.4/fpm/pool.d/www.conf

; Start a new pool named 'www'. [www] ;prefix = /path/to/pools/$pool user = user group = user listen = /varun/php/php7.4-fpm.sock listen.owner = user listen.group = user ;listen.mode = 0660 pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 ;chroot = ;chdir = /vawww ;catch_workers_output = yes ;decorate_workers_output = no ;clear_env = no 7. /etc/php/7.4/fpm/php.ini [PHP] engine = On short_open_tag = Off precision = 14 output_buffering = 4096 zlib.output_compression = Off implicit_flush = Off unserialize_callback_func = serialize_precision = -1 ;open_basedir = disable_functions = pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, disable_classes = zend.enable_gc = On zend.exception_ignore_args = On ;;;;;;;;;;;;;;;;; ; Miscellaneous ; ;;;;;;;;;;;;;;;;; expose_php = Off ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 360 max_input_time = 360 ;max_input_nesting_level = 64 ; How many GET/POST/COOKIE input variables may be accepted ;max_input_vars = 1000 ; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit memory_limit = 512M ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Error handling and logging ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT display_errors = Off display_startup_errors = Off log_errors = On log_errors_max_len = 1024 ignore_repeated_errors = Off ignore_repeated_source = Off report_memleaks = On ;;;;;;;;;;;;;;;;; ; Data Handling ; ;;;;;;;;;;;;;;;;; variables_order = "GPCS" request_order = "GP" register_argc_argv = Off auto_globals_jit = On post_max_size = 8M auto_prepend_file = auto_append_file = default_mimetype = "text/html" default_charset = "UTF-8" ;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; doc_root = user_dir = enable_dl = Off ;cgi.force_redirect = 1 ;cgi.nph = 1 ;cgi.redirect_status_env = ;cgi.fix_pathinfo=1 ;cgi.discard_path=1 ;fastcgi.impersonate = 1 ;fastcgi.logging = 0 ;cgi.rfc2616_headers = 0 ;cgi.check_shebang_line=1 ;;;;;;;;;;;;;;;; ; File Uploads ; ;;;;;;;;;;;;;;;; file_uploads = On upload_max_filesize = 250M max_file_uploads = 20 ;;;;;;;;;;;;;;;;;; ; Fopen wrappers ; ;;;;;;;;;;;;;;;;;; allow_url_fopen = On allow_url_include = Off ;user_agent="PHP" default_socket_timeout = 320 ;auto_detect_line_endings = Off ;;;;;;;;;;;;;;;;;;;;;; ; Dynamic Extensions ; ;;;;;;;;;;;;;;;;;;;;;; ;extension=bz2 ;extension=curl ;extension=ffi ;extension=ftp ;extension=fileinfo ;extension=gd2 ;extension=gettext ;extension=gmp ;extension=intl ;extension=imap ;extension=ldap ;extension=mbstring ;extension=exif ; Must be after mbstring as it depends on it ;extension=mysqli ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client ;extension=odbc ;extension=openssl ;extension=pdo_firebird ;extension=pdo_mysql ;extension=pdo_oci ;extension=pdo_odbc ;extension=pdo_pgsql ;extension=pdo_sqlite ;extension=pgsql ;extension=shmop ;extension=snmp ;extension=soap ;extension=sockets ;extension=sodium ;extension=sqlite3 ;extension=tidy ;extension=xmlrpc ;extension=xsl ;;;;;;;;;;;;;;;;;;; ; Module Settings ; ;;;;;;;;;;;;;;;;;;; [CLI Server] cli_server.color = On [Date] ;date.timezone = [filter] ; http://php.net/filter.default ;filter.default = unsafe_raw ; http://php.net/filter.default-flags ;filter.default_flags = [iconv] ;iconv.input_encoding = ;iconv.internal_encoding = ;iconv.output_encoding = [imap] ;imap.enable_insecure_rsh=0 [intl] ;intl.error_level = E_WARNING ;intl.use_exceptions = 0 [sqlite3] ;sqlite3.extension_dir = ;sqlite3.defensive = 1 [Pcre] ;pcre.backtrack_limit=10000 ;pcre.recursion_limit=100000 ;pcre.jit=1 [Pdo] ;pdo_odbc.connection_pooling=strict ;pdo_odbc.db2_instance_name [Pdo_mysql] ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. pdo_mysql.default_socket= [Phar] ; http://php.net/phar.readonly ;phar.readonly = On ; http://php.net/phar.require-hash ;phar.require_hash = On ;phar.cache_list = [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = localhost ; http://php.net/smtp-port smtp_port = 25 ; For Win32 only. ; http://php.net/sendmail-from ;sendmail_from = [email protected] ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; http://php.net/sendmail-path ;sendmail_path = ;mail.force_extra_parameters = ; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename mail.add_x_header = Off ; The path to a log file that will log all mail() calls. Log entries include ; the full path of the script, line number, To address and headers. ;mail.log = ; Log mail to syslog (Event Log on Windows). ;mail.log = syslog [ODBC] ; http://php.net/odbc.default-db ;odbc.default_db = Not yet implemented ; http://php.net/odbc.default-user ;odbc.default_user = Not yet implemented ; http://php.net/odbc.default-pw ;odbc.default_pw = Not yet implemented ; Controls the ODBC cursor model. ; Default: SQL_CURSOR_STATIC (default). ;odbc.default_cursortype ; Allow or prevent persistent links. ; http://php.net/odbc.allow-persistent odbc.allow_persistent = On ; Check that a connection is still valid before reuse. ; http://php.net/odbc.check-persistent odbc.check_persistent = On ; Maximum number of persistent links. -1 means no limit. ; http://php.net/odbc.max-persistent odbc.max_persistent = -1 ; Maximum number of links (persistent + non-persistent). -1 means no limit. ; http://php.net/odbc.max-links odbc.max_links = -1 ; Handling of LONG fields. Returns number of bytes to variables. 0 means ; passthru. ; http://php.net/odbc.defaultlrl odbc.defaultlrl = 4096 ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char. ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation ; of odbc.defaultlrl and odbc.defaultbinmode ; http://php.net/odbc.defaultbinmode odbc.defaultbinmode = 1 [MySQLi] ; Maximum number of persistent links. -1 means no limit. ; http://php.net/mysqli.max-persistent mysqli.max_persistent = -1 ; Allow accessing, from PHP's perspective, local files with LOAD DATA statements ; http://php.net/mysqli.allow_local_infile ;mysqli.allow_local_infile = On ; Allow or prevent persistent links. ; http://php.net/mysqli.allow-persistent mysqli.allow_persistent = On ; Maximum number of links. -1 means no limit. ; http://php.net/mysqli.max-links mysqli.max_links = -1 ; Default port number for mysqli_connect(). If unset, mysqli_connect() will use ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the ; compile-time value defined MYSQL_PORT (in that order). Win32 will only look ; at MYSQL_PORT. ; http://php.net/mysqli.default-port mysqli.default_port = 3306 ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. ; http://php.net/mysqli.default-socket mysqli.default_socket = ; Default host for mysqli_connect() (doesn't apply in safe mode). ; http://php.net/mysqli.default-host mysqli.default_host = ; Default user for mysqli_connect() (doesn't apply in safe mode). ; http://php.net/mysqli.default-user mysqli.default_user = ; Default password for mysqli_connect() (doesn't apply in safe mode). ; Note that this is generally a *bad* idea to store passwords in this file. ; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw") ; and reveal this password! And of course, any users with read access to this ; file will be able to reveal the password as well. ; http://php.net/mysqli.default-pw mysqli.default_pw = ; Allow or prevent reconnect mysqli.reconnect = Off [mysqlnd] ; Enable / Disable collection of general statistics by mysqlnd which can be ; used to tune and monitor MySQL operations. mysqlnd.collect_statistics = On ; Enable / Disable collection of memory usage statistics by mysqlnd which can be ; used to tune and monitor MySQL operations. mysqlnd.collect_memory_statistics = Off ; Records communication from all extensions using mysqlnd to the specified log ; file. ; http://php.net/mysqlnd.debug ;mysqlnd.debug = ; Defines which queries will be logged. ;mysqlnd.log_mask = 0 ; Default size of the mysqlnd memory pool, which is used by result sets. ;mysqlnd.mempool_default_size = 16000 ; Size of a pre-allocated buffer used when sending commands to MySQL in bytes. ;mysqlnd.net_cmd_buffer_size = 2048 ; Size of a pre-allocated buffer used for reading data sent by the server in ; bytes. ;mysqlnd.net_read_buffer_size = 32768 ; Timeout for network requests in seconds. ;mysqlnd.net_read_timeout = 31536000 ; SHA-256 Authentication Plugin related. File with the MySQL server public RSA ; key. ;mysqlnd.sha256_server_public_key = [OCI8] ;oci8.privileged_connect = Off ;oci8.max_persistent = -1 ;oci8.persistent_timeout = -1 ;oci8.ping_interval = 60 ;oci8.connection_class = ;oci8.events = Off ;oci8.statement_cache_size = 20 ;oci8.default_prefetch = 100 ;oci8.old_oci_close_semantics = Off [PostgreSQL] pgsql.allow_persistent = On pgsql.auto_reset_persistent = Off ; Maximum number of persistent links. -1 means no limit. ; http://php.net/pgsql.max-persistent pgsql.max_persistent = -1 ; Maximum number of links (persistent+non persistent). -1 means no limit. ; http://php.net/pgsql.max-links pgsql.max_links = -1 pgsql.ignore_notice = 0 pgsql.log_notice = 0 [bcmath] ; Number of decimal digits for all bcmath functions. ; http://php.net/bcmath.scale bcmath.scale = 0 [browscap] ; http://php.net/browscap ;browscap = extra/browscap.ini [Session] session.save_handler = files ;session.save_path = "/valib/php/sessions" session.use_strict_mode = 0 ; Whether to use cookies. ; http://php.net/session.use-cookies session.use_cookies = 1 ; http://php.net/session.cookie-secure ;session.cookie_secure = session.use_only_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_path = / session.cookie_domain = session.cookie_httponly = session.cookie_samesite = ; Handler used to serialize data. php is the standard serializer of PHP. ; http://php.net/session.serialize-handler session.serialize_handler = php session.gc_probability = 0 session.gc_divisor = 1000 ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. ; http://php.net/session.gc-maxlifetime session.gc_maxlifetime = 1440 session.referer_check = ; Set to {nocache,private,public,} to determine HTTP caching aspects ; or leave this empty to avoid sending anti-caching headers. ; http://php.net/session.cache-limiter session.cache_limiter = nocache ; Document expires after n minutes. ; http://php.net/session.cache-expire session.cache_expire = 180 session.use_trans_sid = 0 ; Default Value: 32 ; Development Value: 26 ; Production Value: 26 session.sid_length = 26 session.trans_sid_tags = "a=href,area=href,frame=src,form=" ; Default Value: "" ; Development Value: "" ; Production Value: "" ;session.trans_sid_hosts="" session.sid_bits_per_character = 5 ;session.upload_progress.enabled = On ;session.upload_progress.cleanup = On ;session.upload_progress.prefix = "upload_progress_" ;session.upload_progress.name = "PHP_SESSION_UPLOAD_PROGRESS" ;session.upload_progress.freq = "1%" ;session.upload_progress.min_freq = "1" ; Only write session data when session data is changed. Enabled by default. ; http://php.net/session.lazy-write ;session.lazy_write = On [Assertion] ; Switch whether to compile assertions at all (to have no overhead at run-time) ; -1: Do not compile at all ; 0: Jump over assertion at run-time ; 1: Execute assertions ; Changing from or to a negative value is only possible in php.ini! (For turning assertions on and off at run-time, see assert.active, when zend.assertions = 1) ; Default Value: 1 ; Development Value: 1 ; Production Value: -1 ; http://php.net/zend.assertions zend.assertions = -1 ;assert.active = On ;assert.exception = On ;assert.warning = On ;assert.bail = Off ;assert.callback = 0 ;assert.quiet_eval = 0 [COM] ;com.typelib_file = ;com.allow_dcom = true ;com.autoregister_typelib = true ;com.autoregister_casesensitive = false ;com.autoregister_verbose = true ;com.code_page= [mbstring] ;mbstring.language = Japanese ;mbstring.internal_encoding = ;mbstring.http_input = ;mbstring.http_output = ;mbstring.encoding_translation = Off ;mbstring.detect_order = auto ;mbstring.substitute_character = none ;mbstring.func_overload = 0 ;mbstring.strict_detection = On ;mbstring.http_output_conv_mimetype= ;mbstring.regex_stack_limit=100000 ;mbstring.regex_retry_limit=1000000 [gd] ;gd.jpeg_ignore_warning = 1 [exif] ;exif.encode_unicode = ISO-8859-15 ;exif.decode_unicode_motorola = UCS-2BE ;exif.decode_unicode_intel = UCS-2LE ;exif.encode_jis = ;exif.decode_jis_motorola = JIS ;exif.decode_jis_intel = JIS [Tidy] tidy.clean_output = Off [soap] soap.wsdl_cache_enabled=1 soap.wsdl_cache_dir="/tmp" soap.wsdl_cache_ttl=86400 soap.wsdl_cache_limit = 5 [sysvshm] ;sysvshm.init_mem = 10000 [ldap] ; Sets the maximum number of open links or -1 for unlimited. ldap.max_links = -1 [dba] ;dba.default_handler= [opcache] ; Determines if Zend OPCache is enabled ;opcache.enable=1 ; Determines if Zend OPCache is enabled for the CLI version of PHP ;opcache.enable_cli=0 ; The OPcache shared memory storage size. ;opcache.memory_consumption=128 ; The amount of memory for interned strings in Mbytes. ;opcache.interned_strings_buffer=8 ; The maximum number of keys (scripts) in the OPcache hash table. ; Only numbers between 200 and 1000000 are allowed. ;opcache.max_accelerated_files=10000 ; The maximum percentage of "wasted" memory until a restart is scheduled. ;opcache.max_wasted_percentage=5 ;opcache.use_cwd=1 ;opcache.validate_timestamps=1 ;opcache.revalidate_freq=2 ;opcache.revalidate_path=0 ;opcache.save_comments=1 ;opcache.enable_file_override= ;opcache.optimization_level=0x7FFFBFFF ;opcache.dups_fix=0 ;opcache.blacklist_filename= ;opcache.max_file_size=0 ;opcache.consistency_checks=0 ;opcache.force_restart_timeout=180 ;opcache.error_log= ;opcache.log_verbosity_level=1 ;opcache.preferred_memory_model= ;opcache.protect_memory=0 ;opcache.restrict_api= ;opcache.mmap_base= ; Facilitates multiple OPcache instances per user (for Windows only). All PHP ; processes with the same cache ID and user share an OPcache instance. ;opcache.cache_id= ; Enables and sets the second level cache directory. ; It should improve performance when SHM memory is full, at server restart or ; SHM reset. The default "" disables file based caching. ;opcache.file_cache= ; Enables or disables opcode caching in shared memory. ;opcache.file_cache_only=0 ; Enables or disables checksum validation when script loaded from file cache. ;opcache.file_cache_consistency_checks=1 ; Implies opcache.file_cache_only=1 for a certain process that failed to ; reattach to the shared memory (for Windows only). Explicitly enabled file ; cache is required. ;opcache.file_cache_fallback=1 ; Enables or disables copying of PHP code (text segment) into HUGE PAGES. ; This should improve performance, but requires appropriate OS configuration. ;opcache.huge_code_pages=1 ; Validate cached file permissions. ;opcache.validate_permission=0 ; Prevent name collisions in chroot'ed environment. ;opcache.validate_root=0 ; If specified, it produces opcode dumps for debugging different stages of ; optimizations. ;opcache.opt_debug_level=0 ; Specifies a PHP script that is going to be compiled and executed at server ; start-up. ; http://php.net/opcache.preload ;opcache.preload= ; Preloading code as root is not allowed for security reasons. This directive ; facilitates to let the preloading to be run as another user. ; http://php.net/opcache.preload_user ;opcache.preload_user= ; Prevents caching files that are less than this number of seconds old. It ; protects from caching of incompletely updated files. In case all file updates ; on your site are atomic, you may increase performance by setting it to "0". ;opcache.file_update_protection=2 ; Absolute path used to store shared lockfiles (for *nix only). ;opcache.lockfile_path=/tmp [curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. ;curl.cainfo = [openssl] ; The location of a Certificate Authority (CA) file on the local filesystem ; to use when verifying the identity of SSL/TLS peers. Most users should ; not specify a value for this directive as PHP will attempt to use the ; OS-managed cert stores in its absence. If specified, this value may still ; be overridden on a per-stream basis via the "cafile" SSL stream context ; option. ;openssl.cafile= ; If openssl.cafile is not specified or if the CA file is not found, the ; directory pointed to by openssl.capath is searched for a suitable ; certificate. This value must be a correctly hashed certificate directory. ; Most users should not specify a value for this directive as PHP will ; attempt to use the OS-managed cert stores in its absence. If specified, ; this value may still be overridden on a per-stream basis via the "capath" ; SSL stream context option. ;openssl.capath= [ffi] ; FFI API restriction. Possible values: ; "preload" - enabled in CLI scripts and preloaded files (default) ; "false" - always disabled ; "true" - always enabled ;ffi.enable=preload ; List of headers files to preload, wildcard patterns allowed. ;ffi.preload= 

8. output service nginx status & service php7.4-fpm status


# sudo service php7.4-fpm status ● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2020-03-03 17:01:34 CET; 1min 59s ago Docs: man:php-fpm7.4(8) Process: 620 ExecStartPost=/uslib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS) Main PID: 598 (php-fpm7.4) Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec" Tasks: 3 (limit: 4915) Memory: 12.4M CGroup: /system.slice/php7.4-fpm.service ├─598 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf) ├─618 php-fpm: pool www └─619 php-fpm: pool www Mär 03 17:01:34 user systemd[1]: Starting The PHP 7.4 FastCGI Process Manager... Mär 03 17:01:34 user systemd[1]: Started The PHP 7.4 FastCGI Process Manager. 

# sudo service nginx status ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2020-03-03 17:01:39 CET; 2s ago Docs: man:nginx(8) Process: 639 ExecStartPre=/ussbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 657 ExecStart=/ussbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 658 (nginx) Tasks: 5 (limit: 4915) Memory: 4.9M CGroup: /system.slice/nginx.service ├─658 nginx: master process /ussbin/nginx -g daemon on; master_process on; ├─659 nginx: worker process ├─660 nginx: worker process ├─661 nginx: worker process └─662 nginx: worker process Mär 03 17:01:39 user systemd[1]: Starting A high performance web server and a reverse proxy server... Mär 03 17:01:39 user systemd[1]: Started A high performance web server and a reverse proxy server. 
submitted by xmr123 to PHPhelp [link] [comments]

My experience writing processor modules

Someone PM'd me and asked generally about writing a processor specification. I figured I might write something in a post if I were to answer. So just going to ramble with a whiskey.
TL;DR read the SLEIGH/PCODE docs, read the cspec/pspec docs, learn by example, reference other processors implementations of similar instructions. Read the ISA manual and think about your SLEIGH layout. Reference other tools that do similar breakdowns and intermediate lifting. It’s tedious.
I had no prior experience writing SLEIGH/PCODE, but have been professionally doing embedded development and low-level analysis (C/ARM/PPC/MIPS/Intel) with experience in IDA for around 10 years or so. None of this has been for work, only a learning experience (hobby?). I have only ever used Ghidra at work with ppc.
You'll want to get familiar with the SLEIGH and PCODE documentation, which can be found in the ghidra install directory GhidraDocs/languages/index.html. If you're already comfortable with an instruction set, pick one and read along the SLEIGH specification using the reference ISA.
SLEIGH is not complicated and once you get the idea behind the approach you need to take, it becomes easier. I really recommend learning by example. Of all the supported processors, there is a good change most features and instructions have been implemented already.
Once you kind of get familiar with SLEIGH and PCODE , I started with reading through the ISA manual to get a decent overview of things and how they related to the SLEIGH terminology.
I would say the biggest thing to worry about at this point is noticing how the instructions are formatted and mapped (what sort of bit patterns there are). This would be a simple as the first two bits are 11 for 32-bit instructions or 01 for 16-bit instructions or maybe each type of format has specific locations for immediates and registers.
Another concern might be what parts of the instructions are laid out in some logical way that would simplify the SLEIGH (using tables). An easy example here is condition codes. For example you may not need separate instructions for beq, bgt, blt, bne, etc... You can create one branch instruction that uses a table of all the condition codes. Another example might be addressing modes could be put into a table. You might have an address that is a 32-bit immediate, a preload register value, an offset plus a register, an offset plus a register indexed by another register. Instead of having instructions for all of these, you might only need one, paired with a table that exports each of these cases.
Lastly scrape from available sources if possible. There are probably already a lot of resources out there that have done some sort of programmatic analysis or instrumentation of the ISA. Obvious examples here would be binutils, QEMU, or other disassemblers or emulators. Your goal here would be getting a decent layout for your instruction constructors: table header, display section, bit pattern, disassembly action, and semantics action. The first three are basically the minimum to get the listing window working and the latter two the analysis functionality and decompiler.
I took this approach of scripting out the first three sections for my Tricore, RISC-V, and 80960 processor modules(I included those scripts with the processors in my PRs). I did it quick and ugly just to get something resembling what I had in mind. It took a significant amount of copy/paste/regex replace to get into a betteworking state or you might notice how to add better tables and it’s already too late to script.
Once the listing window was semi-working and I was semi-happy with the bit pattern breakdown and variable naming (tokens, registers, etc...) I would begin the process of implementing the instructions in SLEIGH. No real words of wisdom here, I cannot reiterate learn and do by example enough here. This can get super tedious and monotonous so just break it down to reasonable goals or a break down of instruction types (ie arithmetic vs load/store vs state) to work on just to get some feeling of progress.
Once you get far enough into your processor, you will need to implement the other files needed for the processor specification. Every processor will have: slaspec, pspec, cspec, and a ldefs files. Optionally you can implement opinion, patterns, and idx (maybe others vOv).
The slaspec is your SLEIGH, most processors; however, will implement the SLEIGH in sinc files and include the needed sinc in several slapsec that might also define preprocessor macros (ie endianness, register size, floating point size). The cspec or compiler specification defines things like register usage for calling conventions and how data is organized (basic type sizes and alignment) The pspec or processor specification defines context values or named/memory-mapped registers. See github issue #472 for building the documentation for these. The ldefs is the breakdown of the processors that are then listed when selecting a processor when loading a binary.
idx is the page for each instruction in a given ISA manual PDF. The PDF are not distributed with ghidra, but these files include the PDF filename. This allows a user to right-clicking an instruction and easily get to the instruction documentation by choosing Processor Manual.... opinion file uses binary format information to select specific variants found in the ldefs (PE, ELF, COFF, etc... have processor independent fields that can be parsed). patterns file can be used to help Ghidra determine interesting points of disassembly such when a function ends and a new begins to help improve the amount of disassembly generated during auto-analysis.
Lastly in regard to SLEIGH, NSA has created an extension, SleighDevTools, that provides a base source code along with j-unit testing that uses the built-in emulator to test your implementation. If possible get a cross compiler for your platform and build this source, this will probably result in an ELF. If you get to the point in your development that this ELF can be loaded into Ghidra without much issue, you can make use of this feature.
The SLEIGH can also be augmented by Java, making real use of Ghidra as a suite. Additional analysis can be added for EABI specifics (tracking gp/t9 in MIPS across your program) or executable formats (architecture specific relocations, special symbols, etc...). I have not done too much here yet, mostly limited to implementing processor specific ELF relocations.
think that's a good overview.
submitted by mumbel to ghidra [link] [comments]

[Question] How to make cmake find boost?

Hey! Just to be upfront: I'm an absolute noob in regards to programming, so whatever tipps you might offer will have to be dumbed down enough for me to understand it. ;)
I'm trying to use the trinitycore framwork to create an own MMO build for testing purpose. To that end i followed this guide https://trinitycore.atlassian.net/wiki/spaces/tc/pages/10977296/Windows+Requirements but got stuck when I tried to use cmake to generate the build.
I get the following errors when clicking on configure:
Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18362. The C compiler identification is MSVC 19.16.27034.0 The CXX compiler identification is MSVC 19.16.27034.0 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Detecting C compile features Detecting C compile features - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Detected 32-bit platform MSVC: Enabled large address awareness MSVC: Enabled SSE2 support MSVC: Disabled Safe Exception Handlers for debug builds MSVC: Enabled increased number of sections in object files MSVC: Overloaded standard names MSVC: Disabled NON-SECURE warnings MSVC: Disabled POSIX warnings MSVC: Disabled generic compiletime warnings cotire 1.7.10 loaded. Found MySQL library: C:/Program Files/MySQL/MySQL Server 5.6/lib/libmysql.lib Found MySQL headers: C:/Program Files/MySQL/MySQL Server 5.6/include Found MySQL executable: C:/Program Files/MySQL/MySQL Server 5.6/bin/mysql.exe Found git binary : C:/Program Files (x86)/Git/cmd/git.exe * TrinityCore revision : 9381adf2778d 2019-12-08 09:56:45 +0100 (3.3.5-npcbots branch) * Install core to : C:/Program Files (x86)/TrinityCore * Build world/auth : Yes (default) * Build with scripts : Yes (static) * Build Eluna LuaEngine : Yes (default) * Build map/vmap tools : Yes (default) * Build core w/PCH : Yes (default) * Build scripts w/PCH : Yes (default) * Show compile-warnings : No (default) * Use coreside debug : No (default) * Show source tree : Yes (hierarchical) * Use GIT revision hash : Yes (default) Looking for pthread.h Looking for pthread.h - not found Found Threads: TRUE CMake Error at cmake/macros/FindBoost.cmake:1233 (message): Unable to find the requested Boost libraries. Boost version: 1.66.0 Boost include path: C:/local/boost_1_66_0 Could not find the following static Boost libraries: boost_system boost_filesystem boost_thread boost_program_options boost_iostreams boost_regex No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT to the location of Boost. If you still have problems search on forum for TCE00020. Call Stack (most recent call first): dep/boost/CMakeLists.txt:50 (find_package) Performing Test boost_filesystem_copy_links_without_NO_SCOPED_ENUM Performing Test boost_filesystem_copy_links_without_NO_SCOPED_ENUM - Failed Looking for open Looking for open - found CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message): Could NOT find OpenSSL (missing: OPENSSL_LIBRARIES OPENSSL_INCLUDE_DIR) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE) cmake/macros/FindOpenSSL.cmake:186 (find_package_handle_standard_args) dep/openssl/CMakeLists.txt:16 (find_package) Configuring incomplete, errors occurred! See also "C:/WoW Eigener Build/CMakeFiles/CMakeOutput.log". See also "C:/WoW Eigener Build/CMakeFiles/CMakeError.log". 
Apparently cmake is unable to find boost (even though I create the according environment variables as described in the guide) or the OpenSSL, although I'm not sure if that is a follow-up error or not. Either way I could use a little help, because I'm not sure what to do anymore. Has anyone ideas?
submitted by Dratoran to cmake [link] [comments]

Website blocked, then content missing from Pihole home page

Website blocked, then content missing from Pihole home page

Summary

After a transient "Website blocked" page, most of the web content of the web interface home page is missing when accessed by name and none of a reboot, repair or reconfigure fix it. When accessed by IP, it works fine.

Details

Opening the web interface home page in a browser produced a strange page with a seemingly contradictory message which I've not seen before. ns1.halplant.net is the one and only Pihole on the network.

https://preview.redd.it/5qu6by0tqy131.png?width=1579&format=png&auto=webp&s=f354bfcd19dade1d9a5f2b6740b58b3b93b43638
Forcefully reloading (i.e. shift-reload) the page produced the same page. Forcefully reloading again produced this page, which is now the only page served.
https://preview.redd.it/ge6i5kv3sy131.png?width=1579&format=png&auto=webp&s=4615121df8557b09cbb6a10406f3fc49d93fa9b0
Running a repair with pihole -r shows that everything seems fine. Here's the full output:
[email protected]:~ $ pihole -r [✓] Root user check .;;,. .ccccc:,. :cccclll:. ..,, :ccccclll. ;ooodc 'ccll:;ll .oooodc .;cll.;;looo:. .. ','. .',,,,,,'. .',,,,,,,,,,. .',,,,,,,,,,,,.... ....''',,,,,,,'....... ......... .... ......... .......... .......... .......... .......... ......... .... ......... ........,,,,,,,'...... ....',,,,,,,,,,,,. .',,,,,,,,,'. .',,,,,,'. ..'''. [i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u3 [i] Repair option selected [✓] Disk space check [✓] Update local cache of available packages [✓] Checking apt-get for upgraded packages... up to date! [i] Installer Dependency checks... [✓] Checking for apt-utils [✓] Checking for dialog [✓] Checking for debconf [✓] Checking for dhcpcd5 [✓] Checking for git [✓] Checking for iproute2 [✓] Checking for whiptail [i] Performing reconfiguration, skipping download of local repos [✓] Resetting repository within /etc/.pihole... [✓] Resetting repository within /vawww/html/admin... [i] Main Dependency checks... [✓] Checking for cron [✓] Checking for curl [✓] Checking for dnsutils [✓] Checking for iputils-ping [✓] Checking for lsof [✓] Checking for netcat [✓] Checking for psmisc [✓] Checking for sudo [✓] Checking for unzip [✓] Checking for wget [✓] Checking for idn2 [✓] Checking for sqlite3 [✓] Checking for libcap2-bin [✓] Checking for dns-root-data [✓] Checking for resolvconf [✓] Checking for libcap2 [✓] Checking for lighttpd [✓] Checking for php7.0-common [✓] Checking for php7.0-cgi [✓] Checking for php7.0-sqlite3 [✓] Enabling lighttpd service to start on reboot... [i] FTL Checks... [✓] Detected ARM-hf architecture (armv7+) [i] Checking for existing FTL binary... [i] Latest FTL Binary already installed (v4.3.1). Confirming Checksum... [i] Checksum correct. No need to download! [✓] Checking for user 'pihole' [✓] Installing scripts from /etc/.pihole [i] Installing configs from /etc/.pihole... [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone! [✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf [i] Installing blocking page... [✓] Creating directory for blocking page, and copying files [✗] Backing up index.lighttpd.html No default index.lighttpd.html file found... not backing up [✓] Installing sudoer file [✓] Installing latest Cron script [✓] Installing latest logrotate script [i] Backing up /etc/dnsmasq.conf to /etc/dnsmasq.conf.old [✓] man pages installed and database updated [i] Testing if systemd-resolved is enabled [i] Systemd-resolved is not enabled [✓] Restarting lighttpd service... [✓] Enabling lighttpd service to start on reboot... [i] Restarting services... [✓] Enabling pihole-FTL service to start on reboot... [✓] Restarting pihole-FTL service... [✓] Deleting existing list cache [i] Pi-hole blocking is enabled [✗] DNS resolution is currently unavailable [✓] DNS resolution is now available [i] Neutrino emissions detected... [✓] Pulling blocklist source list into range [i] Target: raw.githubusercontent.com (hosts) [✓] Status: Retrieval successful [i] Target: mirror1.malwaredomains.com (justdomains) [✓] Status: Retrieval successful [i] Target: sysctl.org (hosts) [✓] Status: Retrieval successful [i] Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist) [✓] Status: Retrieval successful [i] Target: s3.amazonaws.com (simple_tracking.txt) [✓] Status: Retrieval successful [i] Target: s3.amazonaws.com (simple_ad.txt) [✓] Status: Retrieval successful [i] Target: hosts-file.net (ad_servers.txt) [✓] Status: Retrieval successful [✓] Consolidating blocklists [✓] Extracting domains from blocklists [i] Number of domains being pulled in by gravity: 135701 [✓] Removing duplicate domains [i] Number of unique domains trapped in the Event Horizon: 113443 [i] Number of whitelisted domains: 4 [i] Number of blacklisted domains: 0 [i] Number of regex filters: 0 [✓] Parsing domains into hosts format [✓] Cleaning up stray matter [✓] Force-reloading DNS service [✓] DNS service is running [✓] Pi-hole blocking is Enabled [i] The install log is located at: /etc/pihole/install.log Update Complete! Current Pi-hole version is v4.3 Current AdminLTE version is v4.3 Current FTL version is v4.3.1 
and pictured
https://preview.redd.it/2g2a2aatsy131.png?width=484&format=png&auto=webp&s=24f254c43faf4b277b428abacd9cbf457879b55a
Rebooting the Pihole made no difference. Reconfiguring via pihole -r made no difference. Clearing browser data makes no difference and nor does the choice of browser as evidence by loading the page in a Firefox Private window.

https://preview.redd.it/o7fqrvi9uy131.png?width=1280&format=png&auto=webp&s=f5f4a9a11285cbab275a3de1527f02a213f9127f
in which there was no initial Website blocked page.
There is nothing but stop/start logs in /valog/lighttpd/error.log
2019-06-02 11:41:01: (server.c.1828) server stopped by UID = 0 PID = 1 2019-06-02 11:41:01: (log.c.217) server started 
When accessed by IP, i.e. http://172.17.2.53/, the expected page is consistently loaded.
https://preview.redd.it/lm076ijk2z131.png?width=1579&format=png&auto=webp&s=0e2511d56debecfe7addc5cf9e72a641cee5efbb
The domain, halplant.net, is already whitelisted. Adding ns1.halplant.net to the whitelist makes no difference.
The admin interface - http://ns1.halplant.net/admin/ - continues to work normally.

Aside from network configuration, setting locale and keyboard with sudo localectl set-locale LANG=en_US.utf8 ; sudo localectl set-keymap us and updates with pihole -up I have not changed anything recently or related to the web interface between the time when I believe it was working normally and now.
submitted by AJCxZ0 to pihole [link] [comments]

Let's talk about SciTE4AutoHotkey, what Groggy is up to, why he's currently groggy and why that's the reason for the update. Here's a thread for info, comments, and suggestions. (PS - Happy Friday, everyone!)

Hey guys. I'm pretty excited about getting to post this. Warning: Wall of text incoming. This is like an account of all the stuff that's happened. Don't worry, to prevent total boredom, I've added pictures and gifs. Like a picture book.
Anyway, I've had this big bout of insomnia lately. Like 1-3 hours of sleep a day. Less than 20 hours in a week. It SUCKS!
Maybe it's because my my laptop is inoperable due to fan failure. I had to order a new one because the original died and we all know shipping time is brutal from China.
I'm mentioning that so I can mention this. Me getting 1-3 hours of sleep a night = Hella free time. Hella free time + my main machine being down = X Solve for X. X = I needed a project.
Of my options on "Things to do", SciTE4AutoHotkey was something that had been on there a while, piqued my interest, was something I could start from scratch, could be done on a sub-par laptop, and it seemed beneficial to not just me but everyone. So, I picked it up like a pair of scissors and ran with it.
Some of you may have seen my comment the other day. Twas not a bluff or an attempt at getting free uppies. A couple days before that post, I had already started (and have been actively) rewriting the entire ahk.api and ahk.keyword.properties files from scratch.
I'm also worried about the fact that it has been like 1/2 a decade since someone has updated these files.
I finished rewriting and "carding" every command, built-in function, and built-in variable a couple nights ago. Since then I've (mostly?) finished getting all the "other keywords" listed (What a pain in the ass. Even at this point I know I've missed some stuff. There are just so many options, subcommands, sub-subcommands, properties, methods, options...you guys are smart. You get what the hell I'm going on about.) Last night I started getting into the guts of the program, commenting out the AHK files, reading up on .api files, reading about SciTE's options, etc... More SciTE info for those interested.
So, what changes have you made to the API?
The following numbers are rough but accurate. Items refers to commands, built-in variables, built-in functions, flow controls statements, and other keywords. "Other keywords" refers to language verbs, options, subcommands, subcommand options, etc... Example:
and not in is between extends this on off alwayson alwaysoff toggle ... 
Registry words/values, sound options, sysget/winget/process options, etc... are all "other keywords":
REG_SZ REG_BINARY HKLM HKU PCSPEAKER SYNTH Monitor ID PID ... 
You get the idea.
The Old API has about 1093 items. Of those 1093 items, only 123 have any type of additional info bundled with them. 970 are cardless/infoless. The ones that do have info provided have only the most basic of information and options with no info about anything else.
At the time of this posting, the new API I've written has 1383 items. Up 290 items from the old API. (I can guarantee this will go up before beta release.) Of those 1383 lines, 738 of those items (almost every single command, built-in function, variable, and flow control statement) has a card. Up 615 from the old API's basic info. Of the 645 of those items that don't have cards, most lack one, because they're either "other keywords" or are options|subcommands that are covered on a main command's/function's card.
Why even bother adding all those extra words to the API? It seems like a lot of crappy work for no payoff.
A few reasons.
  1. It causes those commands to show up in the word list.
  2. It makes typing things easier to type. Example: Typing REG_ shows all the Registry stuff in the word list. Pick the one you want and hit enter.
  3. Having all the different keywords listed allows them to receive syntax highlighting. This can be used like a form of visual validation while coding.
A little more info on the updated API (because everyone loves tables!):
Count New Old Increase
CHARACTERS 119,338 28,930 x4
WORDS 17,451 3,533 x5
PARAGRAPHS 1,383 1,093 x1.3
WHITESPACE* 19,123 2,485 x8
* Lots of padding from formatting and cheat sheets.
What exactly are these "CARD" things?
Cards are what I'm calling extended tooltips. For example, with the old SciTE4AHK, if you type #KeyHistory you'd see this. With the new version, you'd see this. (That's one of the lesser detailed cards).
Why bother making cards?
Well, I get sick and tired of wasting time alt+tabbing back and forth from SciTE to the docs just to get small pieces of info. It seems like this wastes a lot of time.
Does this function return a 1 or a 0? Or an empty string? Does it return a word? If yes, what word? What does that word mean? What's the subcommand for this command? Does the subcommand have different syntax?? What are that subcommand's options? What's the option for removing duplicates when using the sort command? What about that option that lets you sort by numbers even if they're inside of a string? Does this command's field use traditional or expression format? Does this command set an errorlevel? Have you the Format() command?!
Do you see what I mean? Time wasted because we need some tiny bit of NECESSARY info to make everything work.
I thought "Why the hell not just update the tooltips to have all the info right there?" Why not make SciTE4AHK better by making its calltips more robust and more like a quick reference guide?"
It sounded good to me so...I did it.
How do these cards look?
Currently, each card is set with its full syntax (multiple lines if the command warrants it) followed by its use and whatever extra info goes with it. I've tried to keep these cards small and compact but still pack in as much info as possible. Commands with multiple subcommands have all subcommands listed at the bottom and each subcommand should have its own card with its own options. The goal is not to cover the entire documentation of each command on each card, but to streamline the important info, the options, get return/errorlevel info, etc.
To the newer users out there, you should always read a command's/function's documentation before using it. Don't go off just the card/calltip. Some commands have tons of info that I could never fit onto 1 card. You might miss an option you need or you might misunderstand a command's usage/output/etc... Though I don't think this will be likely because the cards are pretty straight forward.
Here's the general layout/legend for the current card setup. This lists the majority of LABELS: I use with the cards. No one card will ever have all these.
Command, Value|Subcommand, [OptionalParams, Select|One|Option] NOTES: Item refers to any command, built-in function/variable, or keyword. Parameters separated by | pipes indicate "select one of these". Items inside [] brackets are considered optional. TAGS: USE: What a command/function is used for. VALUE: Variable/text/number. Used as input/output for commands. SUBCOMMAND: List of subcommands for the current command. Most subcommands have their own card and own options. DEPRECATED: A command is phased out and should no longer be used. Deprecated tags always come with a replacement tag. REPLACEMENT: Replacement commands/functions for deprecated items. REPLACEMENT: Use SubStr() instead. REMARK: Additional or beneficial information about an item. REMARK: Omitting WinTitle will default to LastFoundWindow. RETURN: The values a function can return and what they mean. RETURN: 1 = Key Down. 0 = Key Up. ERRORLEVEL: Possible ErrorLevel values and what they mean. ERRORLEVEL: 0 = Failure. 1 = Success. EX: Example of command/function use. Most items have these. Also shows return values and/or how the new data looks. R = Return value of command/function => vaobj after of command/function runs EX: arr =: [1, 2, 3] Arr.RemoveAt(2) ; R=2 ; arr => [1, 3] CHEAT: This item has additional data or info on a Cheat_Sheet_ card. These are used for reference charts, data tables, or other info that just can't fit onto 1 card and tend to be larger than normal. 
About cheat sheets: This is a new category I've added. It's a bunch of cards that have the prefix Cheat_Sheet_ and can be called just like any other command or function. Type "cheat", select the one you want from the word list, hit enter to make the text appear (unfortunately, this is necessary) and then hit space. Like I mentioned before, have you seen the Format() function!? That thing is getting its own cheat sheet.
Examples: Cheat_Sheet_HTML_Color_Names Cheat_Sheet_RegEx
Deleting the word makes the tooltip go away. Ctrl+Backspace deletes a whole word instead of just 1 character. It makes things easy. Or just hit esc.
If you're close to being done with the API (and subsequently the keywords file), what do you have left?
I still have quite a bit left.
Re-organize some of the content Homogenize card formatting (make sure every card follows the format that I've changed like 8 billion times since starting) Proofread EVERYTHING again to find errors, typos, etc... Quite a few cheat sheets to create/finish/prettify. Find a clean way to incorporate hotkey card changing/scrolling. Wanting to use mousewheel up/down and arrow up/down (or possibly ctrl+up/down for this). Get TillaGoTo to recognize functions correctly. Change the opening/closing behavior of calltips/cards and find a way to ensure that the wordlist comes up when it's supposed to. Add a new syntax category that acknowledges AHK's built-in properties and methods. Example: File object methods, file object properties, default object methods, exception object properties, etc.. I'm considering making a "lite" version of the API for those who want minimalistic calltips. 1-3 lines per card? Let me know if there's a want for this. Add a light/dark mode for the wordlist, calltips, and tillagoto. See if there's a possibility to add color support for wordlists/calltips in the themes/option. Looking at bundling Maestrith's GUI Creator with this instead of Smart GUI Creator. I feel Maestrith's GUI Creator is a much better GUI Creator. Or, should I leave Smart GUI Creator in along with it? Opinions? Also, I'm thinking about bundling this impressive message box creator called Magic Box to replace the older MsgBox Creator.
It's a long list but I'm trying to knock stuff off it little by little.
Here's hoping to have a working Beta available soon for you guys.
Speaking of releasing a Beta... If you guys notice a typo, error, come up with a word(s) that should be added, or anything else, SPEAK UP AND LET ME KNOW. Worst case scenario: I disagree with you, I don't add it/change anything, and you're not out anything. Best case scenario: I agree, add it, and you+everyone else get the functionality you requested. Same goes with design ideas/suggestions. But, being honest, I don't have plans on doing tons of expansions to this program (I might not even be capable of it). Regardless, feedback is a great thing. Opinions on the name SciTE4AHK_GO? For GroggyOtter Edition.
When the beta is released, I'll be making a new sticky post. If you'd like a tag notification, leave a comment below with "notify me" in it.
I'll post edits if there's anything else worth mentioning/updates to give. Make sure you check back.
Gonna go grab a burrito. <3
Edit: Still actively working on this. I've invested quite a bit of time into it and will probably be investing quite a bit more as the list of things I want to change/add is growing. Also, my fan finally came. Didn't work. Wrong brand. Wrong amperage... The moral of the story is don't order things from China.
Edit 10Oct2018: For those checking back, I'm still going at this full bore. I had to, unfortunately, rewrite my rewritten API. I did a really REALLY dumb thing. During a simple RegEx search/replace during a formatting thing I was doing, I managed to not click the "in selection" box. It wiped out everything after a comma... All the items and their formatting were saved, but a lot of sentences became 1/2 sentences, commands had all parameters wiped, examples were blanked, etc. :( "Why didn't you just ctrl+z?" Because I didn't know about it until way WAY after. "Why didn't you restore a backup?" The last one I had was pre-finish, let alone pre-formatting changes I had started to do. So, yeah, moral of the story is back your shit up (frequently) and don't make formatting changes to a master document...
On a positive note, I've gotten EVERYTHING redone except for commands H-Z (so like 90% of all lexems in the lexer). As a bonus, the rewrite (I don't like saying rewrite. It's more like re-transcribe and re-format...) allowed me to restructure everything and made the whole process go much faster and smoother. It took probably less than 1/2 the time to do it the second time around. :)
I've also added quite a bit to the "things I'd like to change/implement" list. Not going to post it because I don't know what I want to keep and not keep and don't want to get hopes up. But I will mention one thing I came up with that I really liked and want to run with. I came up with this option. No name yet but I'm thinking SynGUIs or SynStrings. Anyway, the current idea is based on a .syn hotstring. It checks the command/function just typed, looks it up, and then loads a small GUI with that command/function and all its parameters preloaded with defaults (maybe add an option to save user preferred command defaults?). The first design was to use all edit boxes but then I decided to use param appropriate controls. If there are only 3 options, add a dropdown with the 3 options. If there are multiple options, add some checkboxes. Tab navigation. Escape to close. Enter (or click OK button) to insert command where it just was. AKA mouseless navigation. Also, I'd like to implement some kind of error checking. I'm hoping something like this will result in faster code creation with fewer errors. I've already started working on this as a "take a break from writing and formatting the API".
So, that's the update. I hope to have a working beta for you guys sooner than later. Just know that I'm actively working on this every day during my free time. :)
Edit 18Oct2018: I've pretty much written an entire AHK v1.1 Lexicon from the online docs. From that I've made an updated/revised ahk.api rewrite. Admittedly, I think the calltips are a bit large and I need to consider trimming them down or possibly just making a "lite" version with more minimalisitic calltips. I've created some more Cheat_Sheets. Yay! I'm currently working on updating the syntax file with the new categories I've made. This will expand what gets highlighted and allows for more color options.
I've started updating TillaGoto. All the regexs for labels, hotstrings, and functions have been rewritten. Yes functions now show up! Overhauling the GUI and adding some new features. A new sort feature has been added to sort the results in the lsit box by 1) The order it was found 2) ascending order or 3) descending order. Can be seen in the screenshot below. The original colors were really bright, especially against my happy hacker theme. Screenshot of original TillaGoto. I decided to add a "dark mode". Updated TillaGoto in dark mode with the same file. Dark mode can be accessed from the new system tray icon. If anyone wants to design a neat new icon, feel free to post them. I'll let you know if I want to use it. I want to add classes to the detection list and possibly class method detection. I also want to add a tab system that will allow users to sort results by specific type. So there would be an All tab, a Function tab, a Label tab, etc...
That's not everything, but it's a good chunk. With the lexicon rewrite (which I will be posting, too) and api being done, I'll be able to really focus on the changes and updates I wanted to make.
Cheers.
submitted by GroggyOtter to AutoHotkey [link] [comments]

2 Minutes Strategy Configuring SETTINGS And Indicators ... Ichimoku Set ups For Binary Options - YouTube How To Make $600 Per Day Trading Binary Options On Race ... Binary Options Strategy 2020  100% WIN GUARANTEED ... Candlestick Pattern Analysis For Binary Options & Forex ... Barrier Offset No Touch Ticks Binary Options Strategy 100% ... Best Binary Options Strategy 2020 - 2 Min Strategy Live ...

Parameters. options. The options to set. This is a string where each character is an option. To set a mode, the mode character must be the last one set, however there can only be set one mode but multiple options. Parameters. options. The options to set. This is a string where each character is an option. To set a mode, the mode character must be the last one set, however there can only be set one mode but multiple options. Even though not difficult in itself, the Elixir core team have opted not to provide translation for the reverse, e.g. from the actual list of module modifier atoms to the equivalent PCRE binary option, thus you end up with the opts field remaining empty and bereft of the corresponding options in PCRE binary format and thus, you end up with the defective rendering of the Regex as evidenced by ... Full RegEx Reference with help & examples. Undo & Redo with {{getCtrlKey()}}-Z / Y in editors. Search for & rate Community Patterns. Sponsored by #native_company# #native_desc# Want to support RegExr? Consider disabling your ad-blocker for this domain. We'll show a non-intrusive, dev-oriented ad in this area. Expression. JavaScript. Flags . Add Test. No match. Add Test. Build a suite of tests ... Following what Oli Charlesworth says, you can build DFA for divisibility of base b number by a certain divisor d, where the states in the DFA represent the remainder of the division.. For your case (base 2 - binary number, divisor d = 3 10):. Note that the DFA above accepts empty string as a "number" divisible by 3. Parameter-Liste. options. The options to set. This is a string where each character is an option. To set a mode, the mode character must be the last one set, however there can only be set one mode but multiple options. Receives a regex, a binary and a replacement, returns a new binary where the all matches are replaced by replacement. The replacement can be either a string or a function. The string is used as a replacement for every match and it allows specific captures to be accessed via \N or \g{N}, where N is the capture. In case \0 is used, the whole match is inserted. When the replacement is a function ... bson – BSON (Binary JSON) ... and uuid_subtype options with codec_options. Changed in version 2.7: Added compile_re option. If set to False, PyMongo represented BSON regular expressions as Regex objects instead of attempting to compile BSON regular expressions as Python native regular expressions, thus preventing errors for some incompatible patterns, see PYTHON-500. classmethod encode ... Binary options pro signals login live / Binary options trading strategy forum; Mutual fund return on investment average; Eko invest sanski most mapa; AciForex model code of professional responsibility / Internship investment; Stupid guy Forex converter / What are the best binary options; Sar inr Forexpros / Fm trader binary options ; Strategy Forex breakout; Residential investment as a percent ... Regex to match binary numbers with more than two set bits. Tag: regex,binary. If I have a number consisting only of 1's and 0's and I need to create a regular expression that will match only if said number contains more than two instances of the digit 1. Some examples: 1000000010001 0001100000000 1000110010000 0000001000000 0100010000000 I'd need my expression to correctly match the 1st and ...

[index] [23016] [22748] [3467] [9963] [26720] [14957] [9533] [26043] [29643] [2279]

2 Minutes Strategy Configuring SETTINGS And Indicators ...

Visit Binomo Download App : https://bit.ly/2qeQ50g Binomo Link For PC / laptop : https://binomo.com/promo/l28?a=83569bcf4e1a Join Telegram Channel for More H... FOREX & BINARY SIGNALS http://nextwavetrading.com/SIGNALS/forex&binary OPEN YOUR ACCOUNT IQ OPTION HERE: http://nextwavetrading.com/IQoption IQ OPTION FREE D... Barrier Offset No Touch Ticks Binary Options Strategy - 100% Winning Subscribe to this youtube channel for How to make money online and more winning videos!!... Best Binary Options Brokers for this Strategy: 1. 💲💹IQ Option FREE DEMO: http://www.cryptobinarylivingway.com/IQOption1 2. 💲💹Pocket Option FREE DEMO: http The road to success through trading IQ option Best Bot Reviews Iq Option 2020 ,We make videos using this softwhere bot which aims to make it easier for you t... Ichimoku Set ups For Binary Options Race Option: https://secure.raceoption.com/tiny/dNeIk Withdrawals: https://youtu.be/fmS6owOOzNw Follow the steps below to learn how to get started with binar...

http://binaryoptiontrade.subsnistpo.ml