-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
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 | |
/* | |
参考自: | |
http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function | |
http://snipplr.com/view/68099/ | |
*/ | |
function HTTPStatus($num) { | |
$http = array( |
- make sure you have php 5.3+: run
php -v
- Download phpmyadmin (github or main website)
- In the root directory, copy
config.sample.inc.php
>config.inc.php
- Edit config.inc.php, set
$cfg['Servers'][$i]['host']
to the ip address of your mysql server (probably localhost or 127.0.0.1) - In the root phpmyadmin directory run
php -S localhost:8080
- open in your browser: http://localhost:8080
- log in by entering some valid credentials (a user you added or the root user)
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
""" | |
When a view is focused, goes through all open tabs and closes those, whose files don't exist anymore. | |
Tested in Sublime Text 3.0 | |
""" | |
import sublime_plugin | |
import sublime | |
import time | |
import os | |
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
//AWS SDK 1.x.x | |
final PutObjectRequest putRequest = new PutObjectRequest(s3bucket, targetDirectory + “/” + file.getName(), file).withCannedAcl(CannedAccessControlList.PublicRead); | |
final Upload upload = transferManager.upload(putRequest); | |
//AWS SDK 2.0 — with ContentType | |
String fileType = Files.probeContentType(file); | |
final S3Client s3client; | |
s3client.putObject(PutObjectRequest.builder().bucket(s3bucket).key(targetDirectory + FileSystems.getDefault().getSeparator() + file.getFileName()).acl(ObjectCannedACL.PUBLIC_READ).contentType(fileType).build(),RequestBody.of(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
import { AnyAction, Store } from 'redux'; | |
import { BehaviorSubject, Observable } from 'rxjs'; | |
import { distinctUntilChanged, map } from 'rxjs/operators'; | |
import { Injectable } from '@angular/core'; | |
import { NgZone } from '@angular/core'; | |
export type Comparator = (x: any, y: any) => boolean; | |
/** |