Scripts to run specific services
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
##DELIMITER $$ | |
DROP TABLE IF EXISTS `date_dimension`; | |
CREATE TABLE `date_dimension` ( | |
`datekey` int(10) unsigned NOT NULL, | |
`date` date NOT NULL, | |
`day_of_week` tinyint(4) unsigned NOT NULL COMMENT '一星期中的第几天', | |
`day_num_in_month` tinyint(4) unsigned NOT NULL COMMENT '一个月中的第几天', | |
`day_num_overall` mediumint(6) unsigned NOT NULL COMMENT '日计数', | |
`day_name` varchar(9) NOT NULL COMMENT '星期几', |
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
-- Credit to https://www.mssqltips.com/sqlservertip/4054/creating-a-date-dimension-or-calendar-table-in-sql-server/ | |
-- created by Aaron Bertrand (@AaronBertrand) | |
-- modified by goncaloalves | |
DECLARE @StartDate DATE = '20000101', @NumberOfYears INT = 30; | |
-- prevent set or regional settings from interfering with | |
-- interpretation of dates / literals | |
SET DATEFIRST 7; |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
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
# www.fduran.com | |
MySQL Master-Slave Replication Notes | |
Master | |
/etc/mysql/my.cnf | |
server-id = 100 | |
log_bin = /var/log/mysql/mysql-bin.log | |
binlog-do-db = wpdb | |
binlog-ignore-db = mysql |
- Create certificate
- Config Apache to access
https
instead ofhttp
- Config mod rewrite to generate SSL url
- Config Virtual host to test site
- Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file
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
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
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 exemple shows how to parse base64 encoded images (submitted using Summernote), save them locally | |
* and replace the 'src' attribute in the submited HTML content | |
* | |
**/ | |
use Intervention\Image\ImageManagerStatic as Image; | |
class PostController { | |
public function edit(){ |
NewerOlder