-
Open the Terminal
-
Use
mysqldumpto 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
| import sublime | |
| import sublime_plugin | |
| class DoubleClickAtCaretCommand(sublime_plugin.TextCommand): | |
| def run(self, edit, **kwargs): | |
| view = self.view | |
| cursor = view.sel()[0] | |
| (rg, scope) = view.extract_tokens_with_scopes(view.line(cursor))[1] | |
| if 'line-number.match.find-in-files' in scope: |
| # This file should be saved as code.py | |
| # At MagTag startup (or at wakeup time), keep one one of the 4 button pressed. | |
| # The MagTag will switch to the program you choose and remember that decision at each wakeup. | |
| # The trick is to have for each button one CircuitPython program to import. | |
| # You can customise the app_to_start list, here is the current setting: | |
| # no button => magtag_weather | |
| # 1 (D15) => magtag_showtimes | |
| # 2 (D14) => magtag_tree | |
| # 3 (D12) => magtag_spacex | |
| # 4 (D11) => magtag_year_progress_percent |
| save-exact = true # Saves exact version without needing --save-exact. |
| # $ lsb_release -a | |
| # No LSB modules are available. | |
| # Distributor ID: Ubuntu | |
| # Description: Ubuntu 16.04.5 LTS | |
| # Release: 16.04 | |
| # Codename: xenial | |
| # $ uname -a | |
| # Linux xps 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux |
| --silent true |
| const moment = require('moment'); | |
| const fs = require('fs'); | |
| var Utimes = require('@ronomon/utimes'); | |
| const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
| const folder = '100'; | |
| const files = fs.readdirSync(folder); | |
| // console.log(files) | |
| async function changeTimestamp() { | |
| for (const index in files) { |
| import React, { Component } from 'react'; | |
| export default function withPropsChecker(WrappedComponent) { | |
| return class PropsChecker extends Component { | |
| componentWillReceiveProps(nextProps) { | |
| Object.keys(nextProps) | |
| .filter(key => { | |
| return nextProps[key] !== this.props[key]; | |
| }) | |
| .map(key => { |
| import paramsToProps from 'paramsToProps.js' | |
| const MainNavigator = StackNavigator({ | |
| firstScreen: { screen: paramsToProps(FirstScreenComponent) }, | |
| secondScreen: { screen: paramsToProps(SecondScreenComponent) }, | |
| }); |
| var fs = require('fs'); | |
| var crypto = require('crypto'); | |
| fs.readFile('file.pdf', function(err, data) { | |
| var checksum = generateChecksum(data); | |
| console.log(checksum); | |
| }); | |
| function generateChecksum(str, algorithm, encoding) { | |
| return crypto |