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
using dtos; | |
using Microsoft.AspNetCore.Mvc; | |
namespace web.api | |
{ | |
[Route("api/[controller]")] | |
[ApiController] | |
public class ConfigurationsController : ControllerBase | |
{ | |
[HttpGet] |
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
using configs; | |
using databases.models; | |
using Microsoft.EntityFrameworkCore; | |
namespace databases.contexts | |
{ | |
public class ProjectContext : DbContext | |
{ | |
public DbSet<CompanyModel>? companies { get; set; } | |
public DbSet<InvoiceModel>? invoices { get; set; } |
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
int nominator = Nominiators.FOUR; | |
int denominator = Denominators.FOUR; | |
int tempo = Tempos.ONEFOURTY; | |
FileInfo fi = new FileInfo(filename); | |
string pattern = @"^filename-(\d+)-(\d+)-(\d+)\.txt$"; | |
Regex re = new Regex(pattern); | |
Match chunks = re.Match(fi.Name); | |
if(chunks.Groups.Count == 4) |
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
namespace dtos { | |
public class EmployeesDTO { | |
public string employee_id { get; set; } | |
public string employee_code { get; set; } | |
public string employee_title { get; set; } | |
public string employee_name { get; set; } | |
public string employee_email { get; set; } | |
public string employee_phone { get; set; } | |
public string employee_address { get; set; } | |
public string is_visible { get; set; } |
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
import sqlite3 | |
import uuid | |
""" | |
CREATE TABLE "users" ( | |
"user_id" TEXT NOT NULL, | |
"user_email" TEXT NOT NULL UNIQUE, | |
"user_password" TEXT NOT NULL, | |
PRIMARY KEY("user_id") | |
); |
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
[web] | |
comment = PHP Web Directory | |
path = /var/www/html | |
browseable = yes | |
create mask = 0777 | |
directory mask = 0777 | |
follow symlinks = yes | |
only guest = no | |
public = no | |
wide links = yes |
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
{ | |
"require": { | |
"anytizer/guid.php": "dev-master", | |
"illuminate/database": "^5.7", | |
"illuminate/events": "^5.7", | |
"illuminate/container": "^5.7", | |
"illuminate/contracts": "^5.6", | |
} | |
} |
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 | |
header("Content-Type: text/plain; charset=utf-8"); | |
ini_set("default_charset", "UTF-8"); | |
mb_internal_encoding("UTF-8"); | |
mb_http_output("UTF-8"); | |
abstract class database | |
{ | |
protected $pdo = null; |
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
<!-- https://raw.githubusercontent.com/zenorocha/clipboard.js/master/dist/clipboard.min.js --> | |
<script src="clipboard.min.js"></script> | |
<script> | |
function copyc(color, element) | |
{ | |
new Clipboard('.block', { | |
container: element | |
}); | |
} | |
</script> |
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
string args = "-f edit.php"; | |
string file = "php.exe"; | |
ProcessStartInfo info = new ProcessStartInfo(); | |
info.FileName = file; | |
info.Arguments = args; | |
info.RedirectStandardOutput = true; | |
info.RedirectStandardError = true; | |
info.UseShellExecute = false; | |
info.CreateNoWindow = true; // flashing screen hidden |