Skip to content

Instantly share code, notes, and snippets.

View phreakin's full-sized avatar

Phreakin phreakin

View GitHub Profile
create table
alternative_medium (
id bigint unsigned auto_increment,
medium int not null,
alternative_release int not null,
name varchar(255) null,
constraint id unique (id),
constraint name check (`name` <> '')
) collate utf8_unicode_ci charset = utf8 engine = InnoDB;
@phreakin
phreakin / blog_posts_table.sql
Created July 7, 2022 17:47
blog_posts_table.sql
create table blog_posts
(
post_id bigint(32) UNSIGNED not null unique auto_increment,
post_title varchar(255) not null default '',
post_content varchar(255) not null default '',
post_tags tinytext not null default 'Blog Post',
post_slug varchar(255) not null unique,
post_status enum ('Draft','Published','Scheduled','Removed') not null default 'Draft',
category_id bigint(32) UNSIGNED not null default 0,
created_at timestamp default NOW() not null,
@phreakin
phreakin / continents_and countries.sql
Created July 8, 2022 04:01
continents_and countries.sql
# ----------------------------------------------------------------------------------------------------------------------
# Create the continense table
# ----------------------------------------------------------------------------------------------------------------------
DROP TABLE IF EXISTS `continents`;
CREATE TABLE `continents`
(
'global_id' int NOT NULL AUTO_INCREMENT DEFAULT '0' COMMENT 'Global ID',
'code' char(2) NOT NULL DEFAULT '' COMMENT 'Code',
@phreakin
phreakin / plex_schema_2.sql
Created July 14, 2022 06:55
plex_schema_2.sql
DROP TABLE IF EXISTS accounts;
CREATE TABLE accounts
(
id INTEGER PRIMARY KEY NOT NULL,
name VARCHAR(255),
hashed_password VARCHAR(255),
salt VARCHAR(255),
created_at DATETIME,
updated_at DATETIME,
@phreakin
phreakin / getter.py
Created July 15, 2022 00:10
Simple python script to grab the crime data for Mesa, Arizona
#!/usr/bin/python
import pandas as pd
import os
path = 'D:/IdeaProjects/Dara.gov/data/' # Directory where the data is stored
url = 'https://data.mesaaz.gov/resource/39rt-2rfj.csv' # URL of the data
filename = 'mesa_police_incidents.csv' # Name of the file to save the data
# Check if the path and file exist
@phreakin
phreakin / material_colors.css
Created August 7, 2022 04:30
material_colors.css
.red.lighten-5{background-color:#ffebee}
.red-text.text-lighten-5{color:#ffebee}
.red-border.border-lighten-5{border-color:#ffebee}
.red-i.lighten-5{background-color:#ffebee!important}
.red-text-i.text-lighten-5{color:#ffebee!important}
.red-border-i.border-lighten-5{border-color:#ffebee!important}
.red.lighten-4{background-color:#ffcdd2}
.red-text.text-lighten-4{color:#ffcdd2}
.red-border.border-lighten-4{border-color:#ffcdd2}
@phreakin
phreakin / mysql_inventory_management_system.sql
Created August 13, 2022 10:57
mysql_inventory_management_system.sql
CREATE DATABASE IF NOT EXISTS `inventory` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;
USE `inventory`;
-- MySQL dump 10.13 Distrib 8.0.14, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: inventory
-- ------------------------------------------------------
-- Server version 8.0.14
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
@phreakin
phreakin / notification_system.sql
Created August 13, 2022 10:58
notification_system.sql
-- MySQL dump 10.13 Distrib 8.0.14, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: notification
-- ------------------------------------------------------
-- Server version 8.0.14
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION */;
SET NAMES utf8;
@phreakin
phreakin / employee_management_schema.sql
Created August 13, 2022 10:59
employee_management_schema.sql
-- MySQL dump 10.13 Distrib 8.0.14, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: organization
-- ------------------------------------------------------
-- Server version 8.0.14
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION */;
SET NAMES utf8;
@phreakin
phreakin / event_reminder_schema.sql
Created August 13, 2022 11:00
event_reminder_schema.sql
CREATE DATABASE IF NOT EXISTS `calendar` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */;
USE `calendar`;
-- MySQL dump 10.13 Distrib 8.0.14, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: calendar
-- ------------------------------------------------------
-- Server version 8.0.14
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;