This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tweet Message "To send this tweet* I’ve used only Github Copilot suggestions with a programming language I am not familiar with 😮\n\n*through twitter API" | |
twitterMessage = "To send this tweet* I’ve used only Github Copilot suggestions with a programming language I am not familiar with 😮\n\n*through twitter API" | |
# post tweet to twitter | |
import tweepy | |
import os | |
# send tweet | |
def send_tweet(message): | |
# Twitter API credentials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyCustomStates; | |
use GroceryCrud\Core\GroceryCrud as GCrud; | |
use GroceryCrud\Core\State\StateInterface; | |
use GroceryCrud\Core\State\ExportState as GcExportState; | |
class ExportState implements StateInterface { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This is an example of a messy code. Please do not copy any of this code as this is just an example of a bad code. | |
if (!empty($_GET['id'])) { | |
$id = $_GET['id']; | |
if (!is_numeric($id)) { | |
header("HTTP/1.0 404 Not Found"); | |
echo "<h1>⚠️ We are sorry, page not found</h1>"; | |
die; | |
} | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controllers; | |
include(APPPATH . 'Libraries/GroceryCrudEnterprise/autoload.php'); | |
use GroceryCrud\Core\GroceryCrud; | |
class Example extends BaseController | |
{ | |
public function index() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
DocumentRoot "/var/www/my-test-project/public" | |
ServerName my-test-project.local | |
ServerAlias www.my-test-project.local | |
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
include(APPPATH . 'libraries/GroceryCrudEnterprise/autoload.php'); | |
use GroceryCrud\Core\GroceryCrud; | |
class Examples extends CI_Controller { | |
public function __construct() { | |
parent::__construct(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'adapter' => [ | |
'driver' => 'Pdo_Pgsql', // This is the driver that you should be using | |
'database' => 'my_database_name', | |
'username' => 'my_username', | |
'password' => 'my_password' | |
'charset' => 'utf8' | |
] | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<?php | |
foreach($css_files as $file): ?> | |
<link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" /> | |
<?php endforeach; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Examples extends CI_Controller { | |
function __construct() { | |
parent::__construct(); | |
/* Standard Codeigniter Libraries */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace Config; | |
use CodeIgniter\Config\BaseConfig; | |
class GroceryCrudEnterprise extends BaseConfig | |
{ | |
public function getDefaultConfig() { | |
helper('url'); | |
return [ |
NewerOlder