q

CLI Equivalents for Common MAMP PRO and Sequel Pro Tasks

Working on website front ends I sometimes use MAMP PRO to manage local hosts and Sequel Pro to manage databases. Living primarily in my text editor, a terminal, and a browser window, moving to these click-heavy dedicated apps can feel clunky. Happily, the tasks I have most frequently turned to those apps for —starting and stopping servers, creating new hosts, and importing, exporting, deleting, and creating databases— can be done from the command line.

I still pull up MAMP PRO if I need to change a host's PHP version or work with its other more specialized settings, or Sequel Pro to quickly inspect a database, but for the most part I can stay on the keyboard and in my terminal. Here's how:

Command Line MAMP PRO

You can start and stop MAMP PRO's servers from the command line. You can even do this when the MAMP PRO desktop app isn't open.

Note: MAMP PRO's menu icon will not change color to reflect the running/stopped status when the status is changed via the command line.

  • Start the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd startServers
  • Stop the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd stopServers
  • Create a host (replace host_name and root_path):
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd createHost host_name root_path

MAMP PRO-friendly Command Line Sequel Pro

Note: if you don't use MAMP PRO, just replace the /Applications/MAMP/Library/bin/mysql with mysql.

In all of the following commands, replace username with your user name (locally this is likely root) and database_name with your database name. The -p (password) flag with no argument will trigger an interactive password prompt. This is more secure than including your password in the command itself (like -pYourPasswordHere). Of course, if you're using the default password root is not particular secure to begin with so you might just do -pYourPasswordHere.

Setting the -h (host) flag to localhost or 127.0.0.1 tells mysql to look at what's on localhost. With the MAMP PRO servers running, that will be the MAMP PRO databases.

# with the MAMP PRO servers running, these are equivalent:
# /Applications/MAMP/Library/bin/mysql -h 127.0.0.1 other_options
# and
# /Applications/MAMP/Library/bin/mysql -h localhost other_options

/Applications/MAMP/Library/bin/mysql mysql_options # enter. opens an interactive mysql session
mysql> some command; # don't forget the semicolon
mysql> exit;
  • Create a local database
# with the MAMP PRO servers running
# replace `username` with your username, which is `root` by default
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "create database database_name"

or

# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p # and then enter
mysql> create database database_name; # don't forget the semicolon
mysql> exit

    MAMP PRO's databases are stored in /Library/Application Support/appsolute/MAMP PRO/db so to confirm that it worked you can

ls /Library/Application Support/appsolute/MAMP PRO/db
# will output the available mysql versions. For example I have
mysql56_2018-11-05_16-25-13     mysql57

# If it isn't clear which one you're after, open the main MAMP PRO and click
# on the MySQL "servers and services" item. In my case it shows "Version: 5.7.26"

# Now look in the relevant MySQL directory
ls /Library/Application Support/appsolute/MAMP PRO/db/mysql57
# the newly created database should be in the list
  • Delete a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "drop database database_name"
  • Export a dump of a local database. Note that this uses mysqldump not mysql.
# to export an uncompressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name > the/output/path.sql

# to export a compressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name | gzip -c > the/output/path.gz

  • Export a local dump from an external database over SSH. Note that this uses mysqldump not mysql.

# replace `ssh-user`, `ssh_host`, `mysql_user`, `database_name`, and the output path

# to end up with an uncompressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" | gunzip > the/output/path.sql

# to end up with a compressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" > the/output/path.gz
  • Import a local database dump into a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p database_name < the/dump/path.sql
  • Import a local database dump into a remote database over SSH. Use care with this one. But if you are doing it with Sequel Pro —maybe you are copying a Craft site's database from a production server to a QA server— you might as well be able to do it on the command line.
ssh ssh_user@ssh_host "mysql -u username -p remote_database_name" < the/local/dump/path.sql


For me, using the command line instead of the MAMP PRO and Sequel Pro GUI means less switching between keyboard and mouse, less opening up GUI features that aren't typically visible on my screen, and generally better DX. Give it a try! And while MAMP Pro's CLI is limited to the essentials, command line mysql of course knows no limits. If there's something else you use Sequel Pro for, you may be able to come up with a mysql CLI equivalent you like even better.



  • Code
  • Front-end Engineering
  • Back-end Engineering

q

9 Things You Can Do To Your WordPress Website During Quarantine

If you’d have told us at WPZOOM about the current situation we find ourselves in six months ago, we wouldn’t have believed you. It’s all we can see if we turn on the TV and it’s clear right now, humanity has taken a break. Worrying about loved ones, ensuring we stay safe, and for heaven’s sake, stay inside. Staying inside […]





q

CLI Equivalents for Common MAMP PRO and Sequel Pro Tasks

Working on website front ends I sometimes use MAMP PRO to manage local hosts and Sequel Pro to manage databases. Living primarily in my text editor, a terminal, and a browser window, moving to these click-heavy dedicated apps can feel clunky. Happily, the tasks I have most frequently turned to those apps for —starting and stopping servers, creating new hosts, and importing, exporting, deleting, and creating databases— can be done from the command line.

I still pull up MAMP PRO if I need to change a host's PHP version or work with its other more specialized settings, or Sequel Pro to quickly inspect a database, but for the most part I can stay on the keyboard and in my terminal. Here's how:

Command Line MAMP PRO

You can start and stop MAMP PRO's servers from the command line. You can even do this when the MAMP PRO desktop app isn't open.

Note: MAMP PRO's menu icon will not change color to reflect the running/stopped status when the status is changed via the command line.

  • Start the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd startServers
  • Stop the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd stopServers
  • Create a host (replace host_name and root_path):
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd createHost host_name root_path

MAMP PRO-friendly Command Line Sequel Pro

Note: if you don't use MAMP PRO, just replace the /Applications/MAMP/Library/bin/mysql with mysql.

In all of the following commands, replace username with your user name (locally this is likely root) and database_name with your database name. The -p (password) flag with no argument will trigger an interactive password prompt. This is more secure than including your password in the command itself (like -pYourPasswordHere). Of course, if you're using the default password root is not particular secure to begin with so you might just do -pYourPasswordHere.

Setting the -h (host) flag to localhost or 127.0.0.1 tells mysql to look at what's on localhost. With the MAMP PRO servers running, that will be the MAMP PRO databases.

# with the MAMP PRO servers running, these are equivalent:
# /Applications/MAMP/Library/bin/mysql -h 127.0.0.1 other_options
# and
# /Applications/MAMP/Library/bin/mysql -h localhost other_options

/Applications/MAMP/Library/bin/mysql mysql_options # enter. opens an interactive mysql session
mysql> some command; # don't forget the semicolon
mysql> exit;
  • Create a local database
# with the MAMP PRO servers running
# replace `username` with your username, which is `root` by default
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "create database database_name"

or

# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p # and then enter
mysql> create database database_name; # don't forget the semicolon
mysql> exit

    MAMP PRO's databases are stored in /Library/Application Support/appsolute/MAMP PRO/db so to confirm that it worked you can

ls /Library/Application Support/appsolute/MAMP PRO/db
# will output the available mysql versions. For example I have
mysql56_2018-11-05_16-25-13     mysql57

# If it isn't clear which one you're after, open the main MAMP PRO and click
# on the MySQL "servers and services" item. In my case it shows "Version: 5.7.26"

# Now look in the relevant MySQL directory
ls /Library/Application Support/appsolute/MAMP PRO/db/mysql57
# the newly created database should be in the list
  • Delete a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "drop database database_name"
  • Export a dump of a local database. Note that this uses mysqldump not mysql.
# to export an uncompressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name > the/output/path.sql

# to export a compressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name | gzip -c > the/output/path.gz

  • Export a local dump from an external database over SSH. Note that this uses mysqldump not mysql.

# replace `ssh-user`, `ssh_host`, `mysql_user`, `database_name`, and the output path

# to end up with an uncompressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" | gunzip > the/output/path.sql

# to end up with a compressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" > the/output/path.gz
  • Import a local database dump into a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p database_name < the/dump/path.sql
  • Import a local database dump into a remote database over SSH. Use care with this one. But if you are doing it with Sequel Pro —maybe you are copying a Craft site's database from a production server to a QA server— you might as well be able to do it on the command line.
ssh ssh_user@ssh_host "mysql -u username -p remote_database_name" < the/local/dump/path.sql


For me, using the command line instead of the MAMP PRO and Sequel Pro GUI means less switching between keyboard and mouse, less opening up GUI features that aren't typically visible on my screen, and generally better DX. Give it a try! And while MAMP Pro's CLI is limited to the essentials, command line mysql of course knows no limits. If there's something else you use Sequel Pro for, you may be able to come up with a mysql CLI equivalent you like even better.



  • Code
  • Front-end Engineering
  • Back-end Engineering

q

2017 Best WordPress Themes for Boutiques

Boutique Boutique offers you full means to create a tremendous on-line retailer. It’s trendy design and completely different layouts and limitless potentialities will aid you to place your merchandise in focus, It’s also fully responsive and you won’t worry how your prospects reach your store (It really works fantastic with both desktops and smartphones) Boutique […]

The post 2017 Best WordPress Themes for Boutiques appeared first on WP Theme Designer.




q

Troops to receive Purple Hearts for injuries during Iranian missile barrage on al-Asad airbase in Iraq

There will be Purple Hearts awarded to troops injured during the Jan. 8 Iranian missile barrage on the al-Asad airbase in Iraq, a defense official told Military Times.




q

Troops to receive Purple Hearts for injuries during Iranian missile barrage on al-Asad airbase in Iraq

There will be Purple Hearts awarded to troops injured during the Jan. 8 Iranian missile barrage on the al-Asad airbase in Iraq, a defense official told Military Times.




q

How to Simulate Long HTTP Requests

It happens less frequently these days but there are times when we need to accommodate for a HTTP request timing out. The service could be down, under heavy traffic, or just poorly coded, or any host of other issues. Whenever I need to simulate a long HTTP request, I use a bit of PHP to […]

The post How to Simulate Long HTTP Requests appeared first on David Walsh Blog.




q

How to Cancel a Fetch Request

JavaScript promises have always been a major win for the language — they’ve led to a revolution of asynchronous coding that has vastly improved performance on the web. One shortcoming of native promises is that there’s no true way to cancel a fetch…until now. A new AbortController has been added to the JavaScript specification that […]

The post How to Cancel a Fetch Request appeared first on David Walsh Blog.




q

Nikon D750: Answers to Your Real Questions

Whether you’ve just purchased the Nikon D750 or you’re still in the research phase, you likely already know this is a DSLR with an amazing price point. It’s still one of the top rated cameras, even after more than 5 years on the market. Lightweight and extremely reliable, with excellent dynamic range, the Nikon D750 is a full frame DSLR Continue Reading

The post Nikon D750: Answers to Your Real Questions appeared first on Photodoto.




q

75+ High Quality Free Fonts: Handwriting, Script & Brush Fonts

Fonts took on a revival in handmade styles this year, from calligraphic, script and handwritten to brush painted and block-printed. Combined with the great visual appeal of hero images and typographic layouts in web design, handwriting fonts are a trend that you can expect to see more of. In this article you’ll find a fresh […]


The post 75+ High Quality Free Fonts: Handwriting, Script & Brush Fonts appeared first on Web Designer Wall.




q

The Mosquito Gap

By Sarah Anderson Other Words How poverty, climate change, and bad policy put poor people at greater risk from pest-borne diseases. OK, I admit it, I’m a freeloader. My neighbors asked if I’d go in on a mosquito control service … Continue reading




q

5 Tips That You Absolutely Must Know To Design A Unique Metal Business Card

Every day thousands of business cards exchange hands, and these business cards often get lost in mounds of other cards. Often, clients are unable to reach you just because they couldn't find your...



  • Design Roud-up

q

Famous Hope Quotes as Charts

I thought we (i.e. me) could use a break, so I made these abstract charts to represent the most popular quotes about hope.

Tags: ,




q

CLI Equivalents for Common MAMP PRO and Sequel Pro Tasks

Working on website front ends I sometimes use MAMP PRO to manage local hosts and Sequel Pro to manage databases. Living primarily in my text editor, a terminal, and a browser window, moving to these click-heavy dedicated apps can feel clunky. Happily, the tasks I have most frequently turned to those apps for —starting and stopping servers, creating new hosts, and importing, exporting, deleting, and creating databases— can be done from the command line.

I still pull up MAMP PRO if I need to change a host's PHP version or work with its other more specialized settings, or Sequel Pro to quickly inspect a database, but for the most part I can stay on the keyboard and in my terminal. Here's how:

Command Line MAMP PRO

You can start and stop MAMP PRO's servers from the command line. You can even do this when the MAMP PRO desktop app isn't open.

Note: MAMP PRO's menu icon will not change color to reflect the running/stopped status when the status is changed via the command line.

  • Start the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd startServers
  • Stop the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd stopServers
  • Create a host (replace host_name and root_path):
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd createHost host_name root_path

MAMP PRO-friendly Command Line Sequel Pro

Note: if you don't use MAMP PRO, just replace the /Applications/MAMP/Library/bin/mysql with mysql.

In all of the following commands, replace username with your user name (locally this is likely root) and database_name with your database name. The -p (password) flag with no argument will trigger an interactive password prompt. This is more secure than including your password in the command itself (like -pYourPasswordHere). Of course, if you're using the default password root is not particular secure to begin with so you might just do -pYourPasswordHere.

Setting the -h (host) flag to localhost or 127.0.0.1 tells mysql to look at what's on localhost. With the MAMP PRO servers running, that will be the MAMP PRO databases.

# with the MAMP PRO servers running, these are equivalent:
# /Applications/MAMP/Library/bin/mysql -h 127.0.0.1 other_options
# and
# /Applications/MAMP/Library/bin/mysql -h localhost other_options

/Applications/MAMP/Library/bin/mysql mysql_options # enter. opens an interactive mysql session
mysql> some command; # don't forget the semicolon
mysql> exit;
  • Create a local database
# with the MAMP PRO servers running
# replace `username` with your username, which is `root` by default
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "create database database_name"

or

# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p # and then enter
mysql> create database database_name; # don't forget the semicolon
mysql> exit

    MAMP PRO's databases are stored in /Library/Application Support/appsolute/MAMP PRO/db so to confirm that it worked you can

ls /Library/Application Support/appsolute/MAMP PRO/db
# will output the available mysql versions. For example I have
mysql56_2018-11-05_16-25-13     mysql57

# If it isn't clear which one you're after, open the main MAMP PRO and click
# on the MySQL "servers and services" item. In my case it shows "Version: 5.7.26"

# Now look in the relevant MySQL directory
ls /Library/Application Support/appsolute/MAMP PRO/db/mysql57
# the newly created database should be in the list
  • Delete a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "drop database database_name"
  • Export a dump of a local database. Note that this uses mysqldump not mysql.
# to export an uncompressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name > the/output/path.sql

# to export a compressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name | gzip -c > the/output/path.gz

  • Export a local dump from an external database over SSH. Note that this uses mysqldump not mysql.

# replace `ssh-user`, `ssh_host`, `mysql_user`, `database_name`, and the output path

# to end up with an uncompressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" | gunzip > the/output/path.sql

# to end up with a compressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" > the/output/path.gz
  • Import a local database dump into a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p database_name < the/dump/path.sql
  • Import a local database dump into a remote database over SSH. Use care with this one. But if you are doing it with Sequel Pro —maybe you are copying a Craft site's database from a production server to a QA server— you might as well be able to do it on the command line.
ssh ssh_user@ssh_host "mysql -u username -p remote_database_name" < the/local/dump/path.sql


For me, using the command line instead of the MAMP PRO and Sequel Pro GUI means less switching between keyboard and mouse, less opening up GUI features that aren't typically visible on my screen, and generally better DX. Give it a try! And while MAMP Pro's CLI is limited to the essentials, command line mysql of course knows no limits. If there's something else you use Sequel Pro for, you may be able to come up with a mysql CLI equivalent you like even better.



  • Code
  • Front-end Engineering
  • Back-end Engineering

q

"I always hated that word—marketing—and I hate it now. Because for me, and this may sound simplistic,..."

““I always hated that word—marketing—and I hate it now. Because for me, and this may sound simplistic, the key to marketing is to make something people want. When they want it, they buy it. When they buy it, you have sales. So the product has to speak. The product is what markets things.””

- Interview with Tom Ford.




q

"What is deceptive, especially in the West, is our assumption that repetitive and mindless jobs are..."

What is deceptive, especially in the West, is our assumption that repetitive and mindless jobs are dehumanizing. On the other hand, the jobs that require us to use the abilities that are uniquely human, we assume to be humanizing. This is not necessarily true. The determining factor is not so much the nature of our jobs, but for whom they serve.

‘Burnout’ is a result of consuming yourself for something other than yourself. You could be burnt out for an abstract concept, ideal, or even nothing (predicament). You end up burning yourself as fuel for something or someone else. This is what feels dehumanizing. In repetitive physical jobs, you could burn out your body for something other than yourself. In creative jobs, you could burn out your soul. Either way, it would be dehumanizing. Completely mindless jobs and incessantly mindful jobs could both be harmful to us.



- Dsyke Suematsu from his white paper discussed at Why Ad People Burn Out.




q

"In conceptual art the idea or concept is the most important aspect of the work. When an artist uses..."

“In conceptual art the idea or concept is the most important aspect of the work. When an artist uses a conceptual form of art, it means that all of the planning and decisions are made beforehand and the execution is a perfunctory affair. The idea becomes a machine that makes the art. This kind of art is not theoretical or illustrative of theories; it is intuitive, it is involved with all types of mental processes and it is purposeless. It is usually free from the dependence on the skill of the artist as a craftsman.”

- Artist Sol Lewitt on conceptual art.




q

Squared Circle Pit #54 - AVATAR Frontman Johannes Eckerström Talks Wrestling Unlocking His Love of Metal Frontmen

We're back and this week, we're talking to Avatar's colorful frontman Johannes Eckerström. If you've ever seen the band live,...

The post Squared Circle Pit #54 - AVATAR Frontman Johannes Eckerström Talks Wrestling Unlocking His Love of Metal Frontmen appeared first on Metal Injection.







q

Can Houseplants Improve Indoor Air Quality?

By University of Illinois Extension In an era of increasing energy prices, many Americans insulate and seal up their homes during the winter months. Although this can result in savings on the monthly power bill, sealing the home can concentrate … Continue reading




q

Why personas are antiquated (and what you should use instead)

Personas are antiquated… this coming from someone who has relied on and written about them for years. For years at 3.7 Designs, we’ve created personas during the design discovery phase. I recently realized that the traditional marketing persona is no longer a relevant practice. The keyword here is “traditional.” At 3.7 we’ve adopted a practice […]

The post Why personas are antiquated (and what you should use instead) appeared first on Psychology of Web Design | 3.7 Blog.




q

Troops to receive Purple Hearts for injuries during Iranian missile barrage on al-Asad airbase in Iraq

There will be Purple Hearts awarded to troops injured during the Jan. 8 Iranian missile barrage on the al-Asad airbase in Iraq, a defense official told Military Times.




q

the quest for personal style (with pal Alex Strohl)

One of the most common questions I get is about how to stand out + how to develop personal style. So when fellow photographer Alex Strohl stopped by the studio, I wanted to get his take on this ever-popular question. If you’re not familiar with Alex’s work, a quick spin on instagram will fill in the blanks. He’s a photographer that tells stories through pictures and film. And when you see his work, there is a distinct thumbprint on it. Developing a personal style is critical. It’s the reason why someone would seek you out vs someone else. It’s the thing that differentiates your work from everyone else. There’s a thousand ways to develop your personal style. In our conversation, Alex shares some of his insights he’s gained along the way. Though each of us may take a different path to get there, there is one constant, and that’s doing a lot of work. So take a listen and then get back to work. ???? Enjoy and subscribe to the podcast below if you dig.  Please give Alex a shout on social @alexstrohl ???? FOLLOW ALEX: twitter | instagram | website Listen to the Podcast Subscribe   Watch the Episode  […]

The post the quest for personal style (with pal Alex Strohl) appeared first on Chase Jarvis Photography.




q

Start in a Place That’s True with IN-Q

Storytelling is one of the oldest art forms. It connects us. Our brains our wired for it. Story is not only a way for us to share and connect with others, but a path to deeper understanding and vulnerability. That’s why I’m very excited to have on the show award winning Poet, Author, and Performer, IN-Q. In addition to his poetry, live performances and storytelling workshops, IN-Q is a multi-platinum songwriter having worked with Selena Gomez, Aloe Black, Miley Cyrus, Mike Posner, and Foster the People. Oprah named him on her SuperSoul 100 list of the world’s most influential thought leaders. He’s been featured all over the place including A&E, ESPN, HBO, and companies such as Nike, Instagram, Spotify, and many more. In our conversation, we get into his new book, Inquire Within. In fact, he reads a bit of it on the show. It’s an awe-inspiring rhythmic exploration of transforming love, loss, and forgiveness into growth. Super excited for you to hear it. We also get into: Developing your own voice by focusing on what’s moving and meaningful for you How to find calm in the chaos Using vulnerability to short-cut and deepen relationships in our lives and much, […]

The post Start in a Place That’s True with IN-Q appeared first on Chase Jarvis Photography.




q

CLI Equivalents for Common MAMP PRO and Sequel Pro Tasks

Working on website front ends I sometimes use MAMP PRO to manage local hosts and Sequel Pro to manage databases. Living primarily in my text editor, a terminal, and a browser window, moving to these click-heavy dedicated apps can feel clunky. Happily, the tasks I have most frequently turned to those apps for —starting and stopping servers, creating new hosts, and importing, exporting, deleting, and creating databases— can be done from the command line.

I still pull up MAMP PRO if I need to change a host's PHP version or work with its other more specialized settings, or Sequel Pro to quickly inspect a database, but for the most part I can stay on the keyboard and in my terminal. Here's how:

Command Line MAMP PRO

You can start and stop MAMP PRO's servers from the command line. You can even do this when the MAMP PRO desktop app isn't open.

Note: MAMP PRO's menu icon will not change color to reflect the running/stopped status when the status is changed via the command line.

  • Start the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd startServers
  • Stop the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd stopServers
  • Create a host (replace host_name and root_path):
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd createHost host_name root_path

MAMP PRO-friendly Command Line Sequel Pro

Note: if you don't use MAMP PRO, just replace the /Applications/MAMP/Library/bin/mysql with mysql.

In all of the following commands, replace username with your user name (locally this is likely root) and database_name with your database name. The -p (password) flag with no argument will trigger an interactive password prompt. This is more secure than including your password in the command itself (like -pYourPasswordHere). Of course, if you're using the default password root is not particular secure to begin with so you might just do -pYourPasswordHere.

Setting the -h (host) flag to localhost or 127.0.0.1 tells mysql to look at what's on localhost. With the MAMP PRO servers running, that will be the MAMP PRO databases.

# with the MAMP PRO servers running, these are equivalent:
# /Applications/MAMP/Library/bin/mysql -h 127.0.0.1 other_options
# and
# /Applications/MAMP/Library/bin/mysql -h localhost other_options

/Applications/MAMP/Library/bin/mysql mysql_options # enter. opens an interactive mysql session
mysql> some command; # don't forget the semicolon
mysql> exit;
  • Create a local database
# with the MAMP PRO servers running
# replace `username` with your username, which is `root` by default
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "create database database_name"

or

# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p # and then enter
mysql> create database database_name; # don't forget the semicolon
mysql> exit

    MAMP PRO's databases are stored in /Library/Application Support/appsolute/MAMP PRO/db so to confirm that it worked you can

ls /Library/Application Support/appsolute/MAMP PRO/db
# will output the available mysql versions. For example I have
mysql56_2018-11-05_16-25-13     mysql57

# If it isn't clear which one you're after, open the main MAMP PRO and click
# on the MySQL "servers and services" item. In my case it shows "Version: 5.7.26"

# Now look in the relevant MySQL directory
ls /Library/Application Support/appsolute/MAMP PRO/db/mysql57
# the newly created database should be in the list
  • Delete a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "drop database database_name"
  • Export a dump of a local database. Note that this uses mysqldump not mysql.
# to export an uncompressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name > the/output/path.sql

# to export a compressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name | gzip -c > the/output/path.gz

  • Export a local dump from an external database over SSH. Note that this uses mysqldump not mysql.

# replace `ssh-user`, `ssh_host`, `mysql_user`, `database_name`, and the output path

# to end up with an uncompressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" | gunzip > the/output/path.sql

# to end up with a compressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" > the/output/path.gz
  • Import a local database dump into a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p database_name < the/dump/path.sql
  • Import a local database dump into a remote database over SSH. Use care with this one. But if you are doing it with Sequel Pro —maybe you are copying a Craft site's database from a production server to a QA server— you might as well be able to do it on the command line.
ssh ssh_user@ssh_host "mysql -u username -p remote_database_name" < the/local/dump/path.sql


For me, using the command line instead of the MAMP PRO and Sequel Pro GUI means less switching between keyboard and mouse, less opening up GUI features that aren't typically visible on my screen, and generally better DX. Give it a try! And while MAMP Pro's CLI is limited to the essentials, command line mysql of course knows no limits. If there's something else you use Sequel Pro for, you may be able to come up with a mysql CLI equivalent you like even better.



  • Code
  • Front-end Engineering
  • Back-end Engineering

q

#COVIDwear: a hilarious photo series showing quarantine fashion of remote workers

With the coronavirus pandemic, many folks switched to working online. Things like teaching, business meetings and other face-to-face activities have been replaced with video calls. Home has become both home and workplace, and admit it: your wardrobe totally reflects this. Creative duo The Workmans shows this “fashion crossover” in their latest photo series #COVIDwear. The […]

The post #COVIDwear: a hilarious photo series showing quarantine fashion of remote workers appeared first on DIY Photography.






q

Solutions for nonlinear Fokker-Planck equations with measures as initial data and McKean-Vlasov equations. (arXiv:2005.02311v2 [math.AP] UPDATED)

One proves the existence and uniqueness of a generalized (mild) solution for the nonlinear Fokker--Planck equation (FPE) egin{align*} &u_t-Delta (eta(u))+{mathrm{ div}}(D(x)b(u)u)=0, quad tgeq0, xinmathbb{R}^d, d e2, \ &u(0,cdot)=u_0,mbox{in }mathbb{R}^d, end{align*} where $u_0in L^1(mathbb{R}^d)$, $etain C^2(mathbb{R})$ is a nondecreasing function, $bin C^1$, bounded, $bgeq 0$, $Din(L^2cap L^infty)(mathbb{R}^d;mathbb{R}^d)$ with ${ m div}, Din L^infty(mathbb{R}^d)$, and ${ m div},Dgeq0$, $eta$ strictly increasing, if $b$ is not constant. Moreover, $t o u(t,u_0)$ is a semigroup of contractions in $L^1(mathbb{R}^d)$, which leaves invariant the set of probability density functions in $mathbb{R}^d$. If ${ m div},Dgeq0$, $eta'(r)geq a|r|^{alpha-1}$, and $|eta(r)|leq C r^alpha$, $alphageq1,$ $alpha>frac{d-2}d$, $dgeq3$, then $|u(t)|_{L^infty}le Ct^{-frac d{d+(alpha-1)d}} |u_0|^{frac2{2+(m-1)d}},$ $t>0$, and the existence extends to initial data $u_0$ in the space $mathcal{M}_b$ of bounded measures in $mathbb{R}^d$. The solution map $mumapsto S(t)mu$, $tgeq0$, is a Lipschitz contractions on $mathcal{M}_b$ and weakly continuous in $tin[0,infty)$. As a consequence for arbitrary initial laws, we obtain weak solutions to a class of McKean-Vlasov SDEs with coefficients which have singular dependence on the time marginal laws.




q

Some Quot schemes in tilted hearts and moduli spaces of stable pairs. (arXiv:2005.02202v2 [math.AG] UPDATED)

For a smooth projective variety $X$, we study analogs of Quot functors in hearts of non-standard $t$-structures of $D^b(mathrm{Coh}(X))$. The technical framework is that of families of $t$-structures, as studied in arXiv:1902.08184. We provide several examples and suggest possible directions of further investigation, as we reinterpret moduli spaces of stable pairs, in the sense of Thaddeus (arXiv:alg-geom/9210007) and Huybrechts-Lehn (arXiv:alg-geom/9211001), as instances of Quot schemes.




q

Approximate Two-Sphere One-Cylinder Inequality in Parabolic Periodic Homogenization. (arXiv:2005.00989v2 [math.AP] UPDATED)

In this paper, for a family of second-order parabolic equation with rapidly oscillating and time-dependent periodic coefficients, we are interested in an approximate two-sphere one-cylinder inequality for these solutions in parabolic periodic homogenization, which implies an approximate quantitative propagation of smallness. The proof relies on the asymptotic behavior of fundamental solutions and the Lagrange interpolation technique.




q

On the exterior Dirichlet problem for a class of fully nonlinear elliptic equations. (arXiv:2004.12660v3 [math.AP] UPDATED)

In this paper, we mainly establish the existence and uniqueness theorem for solutions of the exterior Dirichlet problem for a class of fully nonlinear second-order elliptic equations related to the eigenvalues of the Hessian, with prescribed generalized symmetric asymptotic behavior at infinity. Moreover, we give some new results for the Hessian equations, Hessian quotient equations and the special Lagrangian equations, which have been studied previously.




q

Finite dimensional simple modules of $(q, mathbf{Q})$-current algebras. (arXiv:2004.11069v2 [math.RT] UPDATED)

The $(q, mathbf{Q})$-current algebra associated with the general linear Lie algebra was introduced by the second author in the study of representation theory of cyclotomic $q$-Schur algebras. In this paper, we study the $(q, mathbf{Q})$-current algebra $U_q(mathfrak{sl}_n^{langle mathbf{Q} angle}[x])$ associated with the special linear Lie algebra $mathfrak{sl}_n$. In particular, we classify finite dimensional simple $U_q(mathfrak{sl}_n^{langle mathbf{Q} angle}[x])$-modules.




q

Equivalence of classical and quantum completeness for real principal type operators on the circle. (arXiv:2004.07547v3 [math.AP] UPDATED)

In this article, we prove that the completeness of the Hamilton flow and essential self-dajointness are equivalent for real principal type operators on the circle. Moreover, we study spectral properties of these operators.




q

Hessian quotient equations on exterior domains. (arXiv:2004.06908v2 [math.AP] UPDATED)

It is well-known that a celebrated J"{o}rgens-Calabi-Pogorelov theorem for Monge-Amp`ere equations states that any classical (viscosity) convex solution of $det(D^2u)=1$ in $mathbb{R}^n$ must be a quadratic polynomial. Therefore, it is an interesting topic to study the existence and uniqueness theorem of such fully nonlinear partial differential equations' Dirichlet problems on exterior domains with suitable asymptotic conditions at infinity. As a continuation of the works of Caffarelli-Li for Monge-Amp`ere equation and of Bao-Li-Li for $k$-Hessian equations, this paper is devoted to the solvability of the exterior Dirichlet problem of Hessian quotient equations $sigma_k(lambda(D^2u))/sigma_l(lambda(D^2u))=1$ for any $1leq l<kleq n$ in all dimensions $ngeq 2$. By introducing the concept of generalized symmetric subsolutions and then using the Perron's method, we establish the existence theorem for viscosity solutions, with prescribed asymptotic behavior which is close to some quadratic polynomial at infinity.




q

$L^p$-regularity of the Bergman projection on quotient domains. (arXiv:2004.02598v2 [math.CV] UPDATED)

We relate the $L^p$-mapping properties of the Bergman projections on two domains in $mathbb{C}^n$, one of which is the quotient of the other under the action of a finite group of biholomorphic automorphisms. We use this relation to deduce the sharp ranges of $L^p$-boundedness of the Bergman projection on certain $n$-dimensional model domains generalizing the Hartogs triangle.




q

Set theoretic Yang-Baxter & reflection equations and quantum group symmetries. (arXiv:2003.08317v3 [math-ph] UPDATED)

Connections between set theoretic Yang-Baxter and reflection equations and quantum integrable systems are investigated. We show that set theoretic $R$-matrices are expressed as twists of known solutions. We then focus on reflection and twisted algebras and we derive the associated defining algebra relations for $R$-matrices being Baxterized solutions of the $A$-type Hecke algebra ${cal H}_N(q=1)$. We show in the case of the reflection algebra that there exists a "boundary" finite sub-algebra for some special choice of "boundary" elements of the $B$-type Hecke algebra ${cal B}_N(q=1, Q)$. We also show the key proposition that the associated double row transfer matrix is essentially expressed in terms of the elements of the $B$-type Hecke algebra. This is one of the fundamental results of this investigation together with the proof of the duality between the boundary finite subalgebra and the $B$-type Hecke algebra. These are universal statements that largely generalize previous relevant findings, and also allow the investigation of the symmetries of the double row transfer matrix.




q

Weak-strong uniqueness for an elastic plate interacting with the Navier Stokes equation. (arXiv:2003.04049v2 [math.AP] UPDATED)

We show weak-strong uniqueness and stability results for the motion of a two or three dimensional fluid governed by the Navier-Stokes equation interacting with a flexible, elastic plate of Koiter type. The plate is situated at the top of the fluid and as such determines the variable part of a time changing domain (that is hence a part of the solution) containing the fluid. The uniqueness result is a consequence of a stability estimate where the difference of two solutions is estimated by the distance of the initial values and outer forces. For that we introduce a methodology that overcomes the problem that the two (variable in time) domains of the fluid velocities and pressures are not the same. The estimate holds under the assumption that one of the two weak solutions possesses some additional higher regularity. The additional regularity is exclusively requested for the velocity of one of the solutions resembling the celebrated Ladyzhenskaya-Prodi-Serrin conditions in the framework of variable domains.




q

$5$-rank of ambiguous class groups of quintic Kummer extensions. (arXiv:2003.00761v2 [math.NT] UPDATED)

Let $k ,=, mathbb{Q}(sqrt[5]{n},zeta_5)$, where $n$ is a positive integer, $5^{th}$ power-free, whose $5-$class group is isomorphic to $mathbb{Z}/5mathbb{Z} imesmathbb{Z}/5mathbb{Z}$. Let $k_0,=,mathbb{Q}(zeta_5)$ be the cyclotomic field containing a primitive $5^{th}$ root of unity $zeta_5$. Let $C_{k,5}^{(sigma)}$ the group of the ambiguous classes under the action of $Gal(k/k_0)$ = $<sigma>$. The aim of this paper is to determine all integers $n$ such that the group of ambiguous classes $C_{k,5}^{(sigma)}$ has rank $1$ or $2$.




q

Solitary wave solutions and global well-posedness for a coupled system of gKdV equations. (arXiv:2002.09531v2 [math.AP] UPDATED)

In this work we consider the initial-value problem associated with a coupled system of generalized Korteweg-de Vries equations. We present a relationship between the best constant for a Gagliardo-Nirenberg type inequality and a criterion for the existence of global solutions in the energy space. We prove that such a constant is directly related to the existence problem of solitary-wave solutions with minimal mass, the so called ground state solutions. To guarantee the existence of ground states we use a variational method.




q

Quasistatic evolution for dislocation-free finite plasticity. (arXiv:1912.10118v2 [math.AP] UPDATED)

We investigate quasistatic evolution in finite plasticity under the assumption that the plastic strain is compatible. This assumption is well-suited to describe the special case of dislocation-free plasticity and entails that the plastic strain is the gradient of a plastic deformation map. The total deformation can be then seen as the composition of a plastic and an elastic deformation. This opens the way to an existence theory for the quasistatic evolution problem featuring both Lagrangian and Eulerian variables. A remarkable trait of the result is that it does not require second-order gradients.




q

Data-driven parameterizations of suboptimal LQR and H2 controllers. (arXiv:1912.07671v2 [math.OC] UPDATED)

In this paper we design suboptimal control laws for an unknown linear system on the basis of measured data. We focus on the suboptimal linear quadratic regulator problem and the suboptimal H2 control problem. For both problems, we establish conditions under which a given data set contains sufficient information for controller design. We follow up by providing a data-driven parameterization of all suboptimal controllers. We will illustrate our results by numerical simulations, which will reveal an interesting trade-off between the number of collected data samples and the achieved controller performance.




q

Regularized vortex approximation for 2D Euler equations with transport noise. (arXiv:1912.07233v2 [math.PR] UPDATED)

We study a mean field approximation for the 2D Euler vorticity equation driven by a transport noise. We prove that the Euler equations can be approximated by interacting point vortices driven by a regularized Biot-Savart kernel and the same common noise. The approximation happens by sending the number of particles $N$ to infinity and the regularization $epsilon$ in the Biot-Savart kernel to $0$, as a suitable function of $N$.




q

Locally equivalent Floer complexes and unoriented link cobordisms. (arXiv:1911.03659v4 [math.GT] UPDATED)

We show that the local equivalence class of the collapsed link Floer complex $cCFL^infty(L)$, together with many $Upsilon$-type invariants extracted from this group, is a concordance invariant of links. In particular, we define a version of the invariants $Upsilon_L(t)$ and $ u^+(L)$ when $L$ is a link and we prove that they give a lower bound for the slice genus $g_4(L)$. Furthermore, in the last section of the paper we study the homology group $HFL'(L)$ and its behaviour under unoriented cobordisms. We obtain that a normalized version of the $upsilon$-set, introduced by Ozsv'ath, Stipsicz and Szab'o, produces a lower bound for the 4-dimensional smooth crosscap number $gamma_4(L)$.




q

A one-loop exact quantization of Chern-Simons theory. (arXiv:1910.05230v2 [math-ph] UPDATED)

We examine Chern-Simons theory as a deformation of a 3-dimensional BF theory that is partially holomorphic and partially topological. In particular, we introduce a novel gauge that leads naturally to a one-loop exact quantization of this BF theory and Chern-Simons theory. This approach illuminates several important features of Chern-Simons theory, notably the bulk-boundary correspondence of Chern-Simons theory with chiral WZW theory. In addition to rigorously constructing the theory, we also explain how it applies to a large class of closely related 3-dimensional theories and some of the consequences for factorization algebras of observables.




q

Compact manifolds of dimension $ngeq 12$ with positive isotropic curvature. (arXiv:1909.12265v4 [math.DG] UPDATED)

We prove the following result: Let $(M,g_0)$ be a compact manifold of dimension $ngeq 12$ with positive isotropic curvature. Then $M$ is diffeomorphic to a spherical space form, or a compact quotient manifold of $mathbb{S}^{n-1} imes mathbb{R}$ by diffeomorphisms, or a connected sum of a finite number of such manifolds. This extends a recent work of Brendle, and implies a conjecture of Schoen in dimensions $ngeq 12$. The proof uses Ricci flow with surgery on compact orbifolds with isolated singularities.




q

Monochromatic Equilateral Triangles in the Unit Distance Graph. (arXiv:1909.09856v2 [math.CO] UPDATED)

Let $chi_{Delta}(mathbb{R}^{n})$ denote the minimum number of colors needed to color $mathbb{R}^{n}$ so that there will not be a monochromatic equilateral triangle with side length $1$. Using the slice rank method, we reprove a result of Frankl and Rodl, and show that $chi_{Delta}left(mathbb{R}^{n} ight)$ grows exponentially with $n$. This technique substantially improves upon the best known quantitative lower bounds for $chi_{Delta}left(mathbb{R}^{n} ight)$, and we obtain [ chi_{Delta}left(mathbb{R}^{n} ight)>(1.01446+o(1))^{n}. ]