ue

AHA Media Alert: COVID-19 prompts questions on increased risk for those with CVD and stroke survivors

AHA COVID-19 newsroom   DALLAS, April 3, 2020 — COVID-19 is prompting widespread questions and concerns about the heightened risk for those with heart disease and stroke survivors.   The American Heart Association, the world’s leading nonprofit...




ue

Leading Health Care Groups Issue Urgent Call for Federal Action to Address Medical Equipment Shortages

  WASHINGTON, D.C., March 30, 2020 — As longstanding organizations representing and supporting those on the front lines who are risking their lives caring for the world’s most vulnerable patients, we stand united in voicing our concern over the ...




ue

La revisión de cigarrillos electrónicos por parte de la FDA es más importante que nunca: cualquier retraso relacionado con COVID-19 debe ser breve

WASHINGTON, D.C., 1 de abril del 2020 – Después de años de demoras perjudiciales por parte de la FDA, en julio del año pasado un juez federal estableció como fecha límite el 12 de mayo del 2020 para que los fabricantes de cigarrillos electrónicos...




ue

American Heart Association issues call to action to prevent venous thromboembolism in hospitalized patients

Statement Highlights:  The projected annual cost of preventable hospital-acquired venous thromboembolism (VTE) is $7 billion to $10 billion per year. Most estimates place the US annual incidence of diagnosed VTE in adults at 1 to 2 per 1000 per...




ue

Los médicos de la ciudad de Nueva York observaron diferentes presentaciones cardiovasculares del COVID-19; impacto de alguna ecv preexistente

DALLAS, 4 de abril del 2020 — El día de ayer, se publicó una investigación en Circulation, la revista insignia de la American Heart Association, cuyo objetivo es ayudar a generar aún más conciencia sobre las manifestaciones cardiovasculares del ...




ue

Más de 200 grupos de pacientes solicitaron a la Administración que tomara medidas adicionales para solucionar la escasez crítica de ventiladores y equipos de protección individual, y garantizara la seguridad de los proveedores y los pa

WASHINGTON, D. C., 3 de abril del 2020— Hoy, más de 200 organizaciones de protección de pacientes, médicas y de salud pública enviaron una carta a altos funcionarios de la administración de Donald Trump, en la cual se apela a la Administración para que...




ue

Es menos probable que quienes comienzan a fumar en la infancia o adolescencia dejen el hábito cuando son adultos

Puntos destacados de la investigación: Mientras más joven comience a fumar, es más probable que fume diariamente cuando sea adulto y es menos probable que haya dejado el hábito a los 40 años, según un estudio internacional que incluye a EE. UU. Los ...




ue

El sector sin fines de lucro pide al Congreso que incluya la “vía sin fines de lucro” en la Ley CARES 2.0

Sala de prensa de la AHA sobre el COVID-19 WASHINGTON, D. C., 9 de abril del 2020— Las organizaciones sin fines de lucro de la nación están en la primera línea en nuestras comunidades durante la pandemia del COVID-19. Trabajan sin cesar para servir a...




ue

La nueva amenaza de la pandemia: gente podría morir por no llamar al 911

DALLAS, 22 de abril de 2020 — Informes de las líneas del frente de los hospitales indican que la cantidad de ataques del corazón y ataques cerebrales a nivel nacional ha caído en forma precipitosa. Sin embargo, es claro que COVID-19 no hace que las ...




ue

Las dos nuevas declaraciones de la AHA se centran en la insuficiencia cardíaca: cómo pueden afectar los determinantes sociales a los resultados clínicos, y el impacto en los cuidadores

Aspectos destacados de las declaraciones: Los factores sociales adversos, como el estado de los seguros, la inseguridad alimentaria, la falta de fondos para medicamentos y otros, pueden causar resultados clínicos negativos de la insuficiencia...




ue

Kids with Kawasaki disease symptoms possibly linked to COVID-19; coronavirus infection leading to critical illness in children remains very infrequent




ue

Mejores hábitos de sueño pueden ayudar a reducir el riesgo de sufrir cardiopatías y a bajar de peso

Puntos destacados de la investigación: Las personas con mejor salud cardíaca, con hábitos de sueño saludables y que cumplen con AHA Life Simple 7, tienen menos probabilidades de tener un diagnóstico de cardiopatía y menos probabilidades de desarrollar...




ue

Comer más proteína vegetal y lácteos en lugar de carne roja puede mejorar la salud del corazón

Puntos destacados de la investigación: En un estudio de más de 37 000 estadounidenses, aquellos que comieron la mayor cantidad de proteína vegetal tenían un 29% menos de probabilidades de morir de una enfermedad coronaria. Sustituir una porción por...




ue

El nuevo registro de datos de pacientes con COVID-19 proporcionará perspectivas sobre la atención y los resultados cardiovasculares adversos

DALLAS, 3 de abril del 2020 – Debido al esfuerzo de médicos, científicos e investigadores de todo el mundo por comprender la pandemia del coronavirus (COVID-19), la American Heart Association está desarrollando un nuevo registro para agregar datos y...




ue

Nueva capacitación sobre el manejo de oxigenación y ventilación para profesionales de la salud

DALLAS, 3 de abril del 2020 – Con la pandemia de COVID-19, más pacientes presentan disnea (dificultad para respirar) y necesitan ventiladores para ayudarlos a respirar. Debido a que los volúmenes de pacientes en hospitales y unidades de cuidados...




ue

Cuidadores a distancia: cómo ayudar a los seres queridos con insuficiencia cardíaca en medio del COVID-19

  DALLAS, 23 de abril del 2020 — A medida que el distanciamiento social mantiene a las familias separadas, es posible que muchos de los que cuidan de un padre o un ser querido que padece insuficiencia cardíaca se pregunten cómo...




ue

IP Warming – An Overlooked Email Deliverability Influence

For many marketers, emails are the lifeline for most marketing efforts. Every SPAM complaint, unsubscribe, or bounce has an impact on the current ROI as well as on the sender’s reputation which affects the ROI of the future campaigns. Yet the sender reputation, that you accumulate over the period of multiple email campaigns, is only...




ue

The chronic and evolving neurological consequences of traumatic brain injury

Traumatic brain injury (TBI) can have lifelong and dynamic effects on health and wellbeing. Research on the longterm consequences emphasises that, for many patients, TBI should be conceptualised as a chronic health condition. Evidence suggests that functional outcomes after TBI can show improvement or deterioration up to two decades after injury, and rates of all-cause mortality remain elevated for many years. Furthermore, TBI represents a risk factor for a variety of neurological illnesses, including epilepsy, stroke, and neurodegenerative disease. With respect to neurodegeneration after TBI, post-mortem studies on the long-term neuropathology after injury have identified complex persisting and evolving abnormalities best described as polypathology, which includes chronic traumatic encephalopathy. Despite growing awareness of the lifelong consequences of TBI, substantial gaps in research exist. Improvements are therefore needed in understanding chronic pathologies and their implications for survivors of TBI, which could inform long-term health management in this sizeable patient population.




ue

Finding the secret homes for blue herons

Even in highly “improved” places like Iowa, nature still has a few secrets, and I got to steal a peek at one last week. Having fished with great blue herons most of my life, I have long...




ue

Best sports movies: ‘Slap Shot’ is true to the sport of hockey

Editor’s note: The Gazette sports staff has compiled lists of its top 15 favorite sports movies. Each day, a different staffer will share some insight into one of their favorites. Some of them...




ue

Xavier senior Kaiden Cuevas turns injuries into possible career

CEDAR RAPIDS — Xavier senior Kaiden Cuevas dedicated a majority of his life to sports, but after three different knee injuries he has decided to stop playing and focus on training other...




ue

Cedar Rapids issues boil order for portions of SW Cedar Rapids

The City of Cedar Rapids Thursday morning issued a drinking water boil order for portions of southwest Cedar Rapids. A rupture in a water main feeding the Bowling Street Booster Station and C Street...




ue

Chew on This: Five places to get carryout barbecue

In normal times, Chew on This focuses on restaurant openings and closings. These are not normal times, with restaurants closed except to carryout, curbside and delivery. We know these businesses...



  • Food & Drink

ue

Ahead of VP Pence’s Iowa visit, Joe Biden’s campaign calls out ‘consequential failure’ of Trump coronavirus response

Vice President Mike Pence owes Iowans more than a photo-op when he visits Des Moines today, according to Joe Biden’s campaign. “Iowans are seeing up close the most consequential failure...




ue

Dubuque woman pleads to helping buy heroin that led to fatal overdose of another person

CEDAR RAPIDS — A Dubuque woman who helped her boyfriend and another person buy heroin that later led to a fatal overdose was convicted Thursday in federal court. Jacqueline M. Birch, 23,...




ue

Flexsteel to close Dubuque plant, idling 200

An Eastern Iowa furniture manufacturer will permanently close two plants, laying off about 370 employees as it drops two lines of business. Flexsteel Industries will close a factory in Dubuque with...




ue

Iowa Writers’ House is gone, but need for literary community continues

When Andrea Wilson approached me five years ago with her idea of creating a space for writers in our community separate from any offered by the University of Iowa, I must admit I was a bit skeptical,...




ue

Borchardt: 2nd District needs a true Iowa citizen legislator

I’m running for Iowa’s 2nd district seat in the U.S. House of Representatives. Early last fall, I found that Mariannette Miller-Meeks is running again, after three losses, and that former Illinois Congressman Bobby Schilling is an Illinoisan turned Iowan. The second district seat should be held by a true Iowa citizen legislator.

The House of Representatives was meant to be the people’s house. One where people temporarily left their home and family to serve in Washington, then returned home to resume their life. Being elected to office was never intended to be a lifetime job. If elected I will serve three terms, then return to Iowa and the private sector.

I believe our government should be small, efficient and responsive to its citizens. I would insist that all government programs are reviewed and eliminated if they are not currently serving the public’s interests. I would also push for a budget that does not grow at a higher rate than incoming revenues.

I believe that all law-abiding citizens have the right to own a gun to hunt or to protect themselves from danger. I will not support any additional restrictions placed on law-abiding citizens.

I believe all life is sacred, from conception to natural death, regardless of ability. It is not my intention to tell any woman what to do with her body. I would prefer that each women take full control of her body and the choices she makes before pregnancy occurs.

In the beginning, our country was land rich and people poor. Anyone who could make it to our country was welcome and opportunities abounded. Today, we are crowded and too many struggle to find substantial work. Immigrants are welcome, but I support only legal immigration, to mitigate how many enter the United States, while our county exercises its right to defend its borders by reasonable means, including strengthening barriers to illegal entry.

I grew up in Washington, Iowa and moved to Iowa City in my late 20s. I currently work in retail and my wife works at a food distribution plant. We have two children, ages 11 and 9, who attend public school in Iowa City. On any given day you could see me at the grocery store, the mall, at the children’s school or at their soccer game. I will be a true citizen-legislator and I would like your support.

Tim Borchardt is a candidate in the Republican primary for Iowa’s 2nd Congressional District.




ue

Iowa Writers’ House is gone, but need for literary community continues

When Andrea Wilson approached me five years ago with her idea of creating a space for writers in our community separate from any offered by the University of Iowa, I must admit I was a bit skeptical, if not defensive. Over a long coffee discussion, I shared with her a detailed look at the literary landscape of Iowa City and all of the things my organization, the Iowa City UNESCO City of Literature was doing to make those assets more visible and accessible.

Coronavirus closes the Iowa Writers’ House - for now

Despite this, Andrea mentioned the need for an “on ramp,” a way for people who don’t feel a part of that community to find their path, to access those riches. It was there, I thought to myself. She just hadn’t looked in the right place.

Then she built that ramp in the form of the Iowa Writers’ House. As she and her team defined what that ramp should look like, what role it should play, the Writers’ House evolved from being an idea with promise to a vital part of our literary infrastructure. She showed that people were hungry for further instruction. They desired more and different ways to connect with one another. These were things beyond the scope and mission of the UI and the City of Literature. She had found her niche, and filled it, nicely complementing what was offered by my organization and others.

But those services do not come without cost. Andrea and her team scrambled, using the house as a literary bed-and-breakfast that was used by many visiting writers. They scheduled workshops. They held fundraisers. But that thin margin disappeared with the onset of COVID-19. Unable to hold those workshops, to serve as a bed-and-breakfast, to provide meaningful in-person connections, the Writers’ House was unable to carry on in its current configuration.

We have every hope and expectation that the Iowa Writers’ House and Andrea will continue to be a part of our literary landscape in the future. This will come perhaps in another form, another space. Conversations have been underway for months about the needs of the literary community beyond the UI. Andrea has been a key part of those discussions, and the work that she and her team has done offer vital information about where those conversations need to go. Gaps have been identified, and while they won’t be filled in the same way, they will be filled.

These conversations join those that have been taking place in our community for decades about the need for space and support for writers and artists. As we all have realized over these past few weeks of isolation just how much we miss when we are not able to gather to create and to celebrate those creations, perhaps those conversations will accelerate and gain focus once we reconvene. The newly formed Iowa City Downtown Arts Alliance, of which we are proud to be a part, is an additional voice in that conversation.

In the meantime, we want to thank Andrea, Associate Director Alisha Jeddeloh, and the team at the Iowa Writers’ House, not just for identifying a need, but for taking the rare and valuable step of actually rolling up their sleeves and doing something to meet it.

John Kenyon is executive director of the Iowa City UNESCO City of Literature.




ue

Flip! A jQuery plugin

I just came across a interesting new plugin built on the wonderful jQuery library. It’s called Flip!, head on over and check out the cool demo!

The post Flip! A jQuery plugin appeared first on WPCult.





ue

Cedar Rapids issues boil order for portions of SW Cedar Rapids

The City of Cedar Rapids Thursday morning issued a drinking water boil order for portions of southwest Cedar Rapids.

A rupture in a water main feeding the Bowling Street Booster Station and C Street Water Tower caused a loss of pressure, which created the potential for bacteria contamination to occur, according to a news release.

The two affected areas are bounded by these streets:

• For the first area, Schaeffer Drive SW east to C Street SW and 19th Avenue SW south to Highway 30.

• For the second area, Sixth Street SW east to J Street SW and 29th Avenue south to 36th Avenue SW.

The city is advising affected residents to:

1) Bring water to a boil

2) Let it rapidly boil for at least 1 minute

3) Allow to cool completely before consuming

The boil order should be lifted or extended by 1 p.m. Sunday, after repairs are complete, pressure is restored, flushing has occurred, chlorine levels have been monitored and two consecutive sets of bacteria samples have been collected for analysis, the city stated.

Water is safe to consume in all other areas of Cedar Rapids.




ue

Chew on This: Five places to get carryout barbecue

In normal times, Chew on This focuses on restaurant openings and closings. These are not normal times, with restaurants closed except to carryout, curbside and delivery. We know these businesses still need support from the community to survive, so each week we are going to highlight five local restaurants.

These are just a few of the many places offering barbecue; look up your favorite restaurants on Facebook or call to find out what they have.

If you don’t want to leave the house, try a delivery service like Chomp, GrubHub or MyTown2Go. Check with the restaurant to make sure they’re affiliated with a delivery service before ordering.

Big’s BBQ Brewpub

124 Second Ave. NW, Mount Vernon; (319) 535-1060, facebook.com/bigsbbq

Get a growler of house-brewed beer to pair with your barbecue. Every Wednesday features a wings special; check the Facebook page for additional daily specials.

County Line

6677 16th Ave. SW, Cedar Rapids; (319) 378-4777, facebook.com/austinbluesbbq

Call in advance orders from 3 to 7 p.m. Wednesday to Friday and pickup from the food truck parked in the parking lot or stop by the truck parked at Cassill Motors, 2939 16th Ave. SW, Cedar Rapids, from 11 a.m. to 1 p.m. Wednesdays and Fridays.

Jimmy Jack’s Rib Shack

1940 Lower Muscatine, Iowa City, (319) 354-7427 and 745 Community Dr., North Liberty, (319) 665-2486; jimmyjacksribshack.com

This Iowa City staple has classic dishes like ribs, smoked chicken and brisket and can even please vegetarians with a portobello sandwich.

Mosley’s

525 S. Gilbert St., Iowa City, (319) 338-1419 and 125 E. Zeller St., North Liberty, (319) 626-4227; mosleysbarbecue.com

Try a family-style meal for curbside pickup, featuring four sandwiches or a slab of ribs, plus sides and cornbread, or order off the menu.

Willie Ray’s Q Shack

288 Blairs Ferry Rd. NE, Cedar Rapids; (319) 206-3806, willieraysqshack.com

This tiny establishment was made for social distancing, with drive-through the only option for service even before the pandemic. Get one of the daily specials or order a la carte.

Comments: (319) 398-8339; alison.gowans@thegazette.com



  • Food & Drink

ue

GOP senators want guest worker visas held up

Four Republican senators closely allied with President Donald Trump are urging him to suspend all new guest worker visas for 60 days, and to suspend other types of worker visas including those for advanced skills sought by the technology industry, until unemployment in the United States “has returned to normal levels.”

The senators, who include Iowa’s Chuck Grassley, said that Trump’s April 22 order suspending most immigrant visas for 60 days doesn’t go far enough.

While Trump suspended the issuing of new green cards for would-be U.S. permanent residents, they want visas affecting skilled workers, agriculture workers and others to face curbs.

“Given the extreme lack of available jobs for American job-seekers as portions of our economy begin to reopen, it defies common sense to admit additional foreign guest workers to compete for such limited employment,” wrote the senators, who also include Tom Cotton of Arkansas, Ted Cruz of Texas and Josh Hawley of Missouri.

The letter was reported earlier by Politico.

The letter from some of the Senate’s most prominent immigration hard-liners could put new pressure on the president to expand his executive order, which drew criticism from business, civil rights and immigrant rights groups who said it would keep companies from hiring critical workers and could prevent family reunification.

The president said at the time there would be carve-outs for migrant agricultural workers, and promised to make it even easier for farmers rebounding from the coronavirus crisis to hire labor from other countries.

The order exempts individuals seeking to permanently enter the country as a medical professional or researcher, as well as members of the armed forces, those seeking asylum or refugee status, and children being adopted by American parents.

In their letter, the senators said Trump should go much further by suspending all new guest worker visas for 60 days.

“Exceptions to this suspension should be rare, limited to time-sensitive industries such as agriculture, and issued only on a case-by-case basis when the employer can demonstrate that they have been unable to find Americans to take the jobs,” they wrote.

After the 60 days, they said, Trump should continue to suspend new non-immigrant guest workers for one year or until U.S. unemployment returns to “normal levels.”

That should include H-1B visas for highly skilled workers in the technology and other industries, H-2B visas for non-agricultural seasonal workers and those in the Optional Practical Training Program that extends visas of foreign students after they graduate.

About three-quarters of H-1B visas go to people working in the technology industry, though the exact levels vary year by year.

They also called on Trump to suspend the EB-5 immigrant visa program “effective immediately,” calling it “plagued by scandal and fraud” and in need of change.

EB-5 visas allow immigrant investors to qualify for a green card by investing at least $900,000 in a business that will employ at least 10 Americans.



  • Nation & World

ue

Ahead of VP Pence’s Iowa visit, Joe Biden’s campaign calls out ‘consequential failure’ of Trump coronavirus response

Vice President Mike Pence owes Iowans more than a photo-op when he visits Des Moines today, according to Joe Biden’s campaign.

“Iowans are seeing up close the most consequential failure of government in modern American history,” said Kate Bedingfeld, spokeswoman for the former vice president and presumptive Democratic presidential nominee.

“With nearly 300,000 Iowans filing for unemployment, rural hospitals on life support, Latino communities disproportionately suffering and workers on the job without sufficient protection, Mike Pence owes Iowans more than a photo-op — he owes them answers,” she said.

Pence, head of the White House coronavirus task force, is scheduled to meet with Iowa Gov. Kim Reynolds and U.S. Sens. Chuck Grassley and Joni Ernst, all Republicans, as well as with faith, farm and food production leaders.

Pence will talk to faith leaders about how they are using federal and state guidelines to open their houses of worship in a safe and responsible manner.

Later, he will go to Hy-Vee’s headquarters in West Des Moines for a roundtable discussion with agriculture and food supply leaders to discuss steps being taken to ensure the food supply remains secure.

Pence has called Iowa a “success story” in its response to the COVID-19, but Bedingfeld said the Trump administration failed to protect Iowa families from the virus that has claimed the lives of 231 Iowans.

“From devastating losses across the state, at meatpacking plants to rural communities, one thing is clear — it’s Iowans and the American people who are paying the price for the Trump administration’s denials and delays in response to this pandemic,” she said.

“Instead of listening to our own intelligence agencies and public health experts, Donald Trump was fed dangerous propaganda from the Chinese Communist Party — and he bought it,” she said. “Iowans deserve better — they deserve Joe Biden.”

For his part, Grassley said he welcomes the discussion with Pence.

“There’s much work to be done, and the pandemic is disrupting all of our communities,” Grassley said. “It’s important to hear directly from those who help feed the nation and the world.”

Ernst also is looking forward to the discussion of how Iowa is working to protect the health and safety of Iowa’s families and communities while reopening the state’s economy.

“We continue to take an all-hands-on-deck approach to tackling this pandemic,” she said. “Together, we will get through this.”

Comments: (319) 398-8375; james.lynch@thegazette.com




ue

Dubuque woman pleads to helping buy heroin that led to fatal overdose of another person

CEDAR RAPIDS — A Dubuque woman who helped her boyfriend and another person buy heroin that later led to a fatal overdose was convicted Thursday in federal court.

Jacqueline M. Birch, 23, pleaded guilty in U.S. District Court to one count of aiding and abetting the distribution of a controlled substance.

During the plea hearing, Birch admitted she knew that another person was going to illegally distribute a drug last May, and she aided in that distribution.

Evidence at a previous hearing showed that Birch drove her boyfriend, Mateusz Syryjczyk, 29, of Rockford, Ill., and another person, not identified in court documents, to a residence in Dubuque on May 27. Birch and the other person went into the residence and bought heroin from a dealer. The three drove to a hotel in Dubuque and all used the heroin.

The other person began to overdose in the room, but Birch and Syryjczyk didn’t immediately call 911, according to evidence. Over many hours, Birch occasionally would perform CPR on the person to restore some breathing function, though the person never regained consciousness.

Eventually, Birch and Syryjczyk decided to call 911, and Syryjczyk took the remaining drug paraphernalia from the room to prevent law enforcement from finding it, according to court documents. Birch and Syryjczyk also made false statements to police about the cause of the person’s condition.

Court documents showed the overdose victim died at the scene. An autopsy later determined the cause of death was use of heroin, fentanyl and valeryl fentanyl.

Syryjczyk previously pleaded to misprision of a felony and remains free on bond pending sentencing.

Birch faces up to 20 years in federal prison, a $1 million fine and supervised release for life following her prison term.

Sentencing will be set after a presentencing report is prepared.

The case was investigated by the Dubuque Drug Task Force and is being prosecuted by Assistant U.S. Attorney Dan Chatham.

Comments: (319) 398-8318; trish.mehaffey@thegazette.com




ue

Flexsteel to close Dubuque plant, idling 200

An Eastern Iowa furniture manufacturer will permanently close two plants, laying off about 370 employees as it drops two lines of business.

Flexsteel Industries will close a factory in Dubuque with 200 employees that manufactures products for the recreational vehicle industry.

The publicly traded company also will close a plant in Starkville, Miss., that produces products for the RV and hospitality industries and employs about 170 people.

In a news release, Flexsteel said its decision to stop manufacturing RV and hospitality furniture was due to rapidly declining customer demand and changing market conditions resulting from the ongoing COVID-19 pandemic.

Flexsteel said the two markets already had entered a cyclical decline before the effects of the pandemic occurred.

“It has become clear that what was thought to be a short-term hit to these two already challenged businesses will now extend well into the future and will likely not return to pre-pandemic levels for some time,” said Jerry Dittmer, Flexsteel president and CEO. “This pandemic has been unforgiving to many companies, including ours. We find ourselves making these hard decisions as we attempt to navigate these uncharted business conditions.”

The Dubuque and Starkville plants temporarily were shut down in late March due to sudden drops in demand as many of Flexsteel’s customers shut down in the wake of the pandemic.

Dittmer said the company will be working with its work force, customers and suppliers to determine a feasible ramp-down plan. While it is anticipated that both facilities could close as early as June, the date may fluctuate sooner or later based on business conditions.

Dittmer said the company will increase its focus on home furnishings, e-commerce and workspace solutions.




ue

Committed to the wrong branch? -, @{upstream}, and @{-1} to the rescue

I get into this situation sometimes. Maybe you do too. I merge feature work into a branch used to collect features, and then continue development but on that branch instead of back on the feature branch

git checkout feature
# ... bunch of feature commits ...
git push
git checkout qa-environment
git merge --no-ff --no-edit feature
git push
# deploy qa-environment to the QA remote environment
# ... more feature commits ...
# oh. I'm not committing in the feature branch like I should be

and have to move those commits to the feature branch they belong in and take them out of the throwaway accumulator branch

git checkout feature
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout qa-environment
git reset --hard origin/qa-environment
git merge --no-ff --no-edit feature
git checkout feature
# ready for more feature commits

Maybe you prefer

git branch -D qa-environment
git checkout qa-environment

over

git checkout qa-environment
git reset --hard origin/qa-environment

Either way, that works. But it'd be nicer if we didn't have to type or even remember the branches' names and the remote's name. They are what is keeping this from being a context-independent string of commands you run any time this mistake happens. That's what we're going to solve here.

Shorthands for longevity

I like to use all possible natively supported shorthands. There are two broad motivations for that.

  1. Fingers have a limited number of movements in them. Save as many as possible left late in life.
  2. Current research suggests that multitasking has detrimental effects on memory. Development tends to be very heavy on multitasking. Maybe relieving some of the pressure on quick-access short term memory (like knowing all relevant branch names) add up to leave a healthier memory down the line.

First up for our scenario: the - shorthand, which refers to the previously checked out branch. There are a few places we can't use it, but it helps a lot:

Bash
# USING -

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit -        # ????
git push
# hack hack hack
# whoops
git checkout -        # now on feature ???? 
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout - # now on qa-environment ????
git reset --hard origin/qa-environment
git merge --no-ff --no-edit -        # ????
git checkout -                       # ????
# on feature and ready for more feature commits
Bash
# ORIGINAL

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit feature
git push
# hack hack hack
# whoops
git checkout feature
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout qa-environment
git reset --hard origin/qa-environment
git merge --no-ff --no-edit feature
git checkout feature
# ready for more feature commits

We cannot use - when cherry-picking a range

> git cherry-pick origin/-..-
fatal: bad revision 'origin/-..-'

> git cherry-pick origin/qa-environment..-
fatal: bad revision 'origin/qa-environment..-'

and even if we could we'd still have provide the remote's name (here, origin).

That shorthand doesn't apply in the later reset --hard command, and we cannot use it in the branch -D && checkout approach either. branch -D does not support the - shorthand and once the branch is deleted checkout can't reach it with -:

# assuming that branch-a has an upstream origin/branch-a
> git checkout branch-a
> git checkout branch-b
> git checkout -
> git branch -D -
error: branch '-' not found.
> git branch -D branch-a
> git checkout -
error: pathspec '-' did not match any file(s) known to git

So we have to remember the remote's name (we know it's origin because we are devoting memory space to knowing that this isn't one of those times it's something else), the remote tracking branch's name, the local branch's name, and we're typing those all out. No good! Let's figure out some shorthands.

@{-<n>} is hard to say but easy to fall in love with

We can do a little better by using @{-<n>} (you'll also sometimes see it referred to be the older @{-N}). It is a special construct for referring to the nth previously checked out ref.

> git checkout branch-a
> git checkout branch-b
> git rev-parse --abbrev-rev @{-1} # the name of the previously checked out branch
branch-a
> git checkout branch-c
> git rev-parse --abbrev-rev @{-2} # the name of branch checked out before the previously checked out one
branch-a

Back in our scenario, we're on qa-environment, we switch to feature, and then want to refer to qa-environment. That's @{-1}! So instead of

git cherry-pick origin/qa-environment..qa-environment

We can do

git cherry-pick origin/qa-environment..@{-1}

Here's where we are (🎉 marks wins from -, 💥 marks the win from @{-1})

Bash
# USING - AND @{-1}

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit -                # ????
git push
# hack hack hack
# whoops
git checkout -                               # ????
git cherry-pick origin/qa-environment..@{-1} # ????
git push
git checkout -                               # ????
git reset --hard origin/qa-environment
git merge --no-ff --no-edit -                # ????
git checkout -                               # ????
# ready for more feature commits
Bash
# ORIGINAL

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit feature
git push
# hack hack hack
# whoops
git checkout feature
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout qa-environment
git reset --hard origin/qa-environment
git merge --no-ff --no-edit feature
git checkout feature
# ready for more feature commits

One down, two to go: we're still relying on memory for the remote's name and the remote branch's name and we're still typing both out in full. Can we replace those with generic shorthands?

@{-1} is the ref itself, not the ref's name, we can't do

> git cherry-pick origin/@{-1}..@{-1}
origin/@{-1}
fatal: ambiguous argument 'origin/@{-1}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

because there is no branch origin/@{-1}. For the same reason, @{-1} does not give us a generalized shorthand for the scenario's later git reset --hard origin/qa-environment command.

But good news!

Do @{u} @{push}

@{upstream} or its shorthand @{u} is the remote branch a that would be pulled from if git pull were run. @{push} is the remote branch that would be pushed to if git push was run.

> git checkout branch-a
Switched to branch 'branch-a'
Your branch is ahead of 'origin/branch-a' by 3 commits.
  (use "git push" to publish your local commits)
> git reset --hard origin/branch-a
HEAD is now at <the SHA origin/branch-a is at>

we can

> git checkout branch-a
Switched to branch 'branch-a'
Your branch is ahead of 'origin/branch-a' by 3 commits.
  (use "git push" to publish your local commits)
> git reset --hard @{u}                                # <-- So Cool!
HEAD is now at <the SHA origin/branch-a is at>

Tacking either onto a branch name will give that branch's @{upstream} or @{push}. For example

git checkout branch-a@{u}

is the branch branch-a pulls from.

In the common workflow where a branch pulls from and pushes to the same branch, @{upstream} and @{push} will be the same, leaving @{u} as preferable for its terseness. @{push} shines in triangular workflows where you pull from one remote and push to another (see the external links below).

Going back to our scenario, it means short, portable commands with a minimum human memory footprint. (🎉 marks wins from -, 💥 marks the win from @{-1}, 😎 marks the wins from @{u}.)

Bash
# USING - AND @{-1} AND @{u}

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit -    # ????
git push
# hack hack hack
# whoops
git checkout -                   # ????
git cherry-pick @{-1}@{u}..@{-1} # ????????
git push
git checkout -                   # ????
git reset --hard @{u}            # ????
git merge --no-ff --no-edit -    # ????
git checkout -                   # ????
# ready for more feature commits
Bash
# ORIGINAL

git checkout feature
# hack hack hack
git push
git checkout qa-environment
git merge --no-ff --no-edit feature
git push
# hack hack hack
# whoops
git checkout feature
git cherry-pick origin/qa-environment..qa-environment
git push
git checkout qa-environment
git reset --hard origin/qa-environment
git merge --no-ff --no-edit feature
git checkout feature
# ready for more feature commits

Make the things you repeat the easiest to do

Because these commands are generalized, we can run some series of them once, maybe

git checkout - && git reset --hard @{u} && git checkout -

or

git checkout - && git cherry-pick @{-1}@{u}.. @{-1} && git checkout - && git reset --hard @{u} && git checkout -

and then those will be in the shell history just waiting to be retrieved and run again the next time, whether with CtrlR incremental search or history substring searching bound to the up arrow or however your interactive shell is configured. Or make it an alias, or even better an abbreviation if your interactive shell supports them. Save the body wear and tear, give memory a break, and level up in Git.

And keep going

The GitHub blog has a good primer on triangular workflows and how they can polish your process of contributing to external projects.

The FreeBSD Wiki has a more in-depth article on triangular workflow process (though it doesn't know about @{push} and @{upstream}).

The construct @{-<n>} and the suffixes @{push} and @{upstream} are all part of the gitrevisions spec. Direct links to each:



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

    ue

    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

    ue

    What happens if my visa is refused or cancelled due to my character?

    If you have your visa refused or cancelled, you need to get expert advice a soon as possible. Strict time limits apply to drafting submissions and appeals. A visa refusal or cancellation can limit the type or visas you can apply for in the future or even prohibit you from applying for any visa to […]

    The post What happens if my visa is refused or cancelled due to my character? appeared first on Visa Australia - Immigration Lawyers & Registered Migration Agents.




    ue

    Visa cancelled due to incorrect information given or provided to the Department of Home Affairs

    It is a requirement that a visa applicant must fill in or complete his or her application form in a manner that all questions are answered, and no incorrect answers are given or provided. There is also a requirement that visa applicants must not provide incorrect information during interviews with the Minister for Immigration (‘Minister’), […]

    The post Visa cancelled due to incorrect information given or provided to the Department of Home Affairs appeared first on Visa Australia - Immigration Lawyers & Registered Migration Agents.



    • Visa Cancellation
    • 1703474 (Refugee) [2017] AATA 2985
    • cancel a visa
    • cancelledvi sa
    • Citizenship and Multicultural Affairs
    • Department of Home Affairs
    • migration act 1958
    • minister for immigration
    • NOICC
    • notice of intention to consider cancellation
    • Sanaee (Migration) [2019] AATA 4506
    • section 109
    • time limits

    ue

    7 Best WordPress Membership Plugins to Generate Recurring Revenue

    Do you want to turn your WordPress blog into a membership site? Businesses around the globe use this model to sell their physical products or offer exclusive digital content, and many of them are super successful. CopyBlogger, a site with content marketing lessons, offers premium courses to members and they’re currently an eight-figure business. Meanwhile, the owner of the razor […]





    ue

    Committed to the wrong branch? -, @{upstream}, and @{-1} to the rescue

    I get into this situation sometimes. Maybe you do too. I merge feature work into a branch used to collect features, and then continue development but on that branch instead of back on the feature branch

    git checkout feature
    # ... bunch of feature commits ...
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit feature
    git push
    # deploy qa-environment to the QA remote environment
    # ... more feature commits ...
    # oh. I'm not committing in the feature branch like I should be

    and have to move those commits to the feature branch they belong in and take them out of the throwaway accumulator branch

    git checkout feature
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout qa-environment
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit feature
    git checkout feature
    # ready for more feature commits

    Maybe you prefer

    git branch -D qa-environment
    git checkout qa-environment

    over

    git checkout qa-environment
    git reset --hard origin/qa-environment

    Either way, that works. But it'd be nicer if we didn't have to type or even remember the branches' names and the remote's name. They are what is keeping this from being a context-independent string of commands you run any time this mistake happens. That's what we're going to solve here.

    Shorthands for longevity

    I like to use all possible natively supported shorthands. There are two broad motivations for that.

    1. Fingers have a limited number of movements in them. Save as many as possible left late in life.
    2. Current research suggests that multitasking has detrimental effects on memory. Development tends to be very heavy on multitasking. Maybe relieving some of the pressure on quick-access short term memory (like knowing all relevant branch names) add up to leave a healthier memory down the line.

    First up for our scenario: the - shorthand, which refers to the previously checked out branch. There are a few places we can't use it, but it helps a lot:

    Bash
    # USING -
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit -        # ????
    git push
    # hack hack hack
    # whoops
    git checkout -        # now on feature ???? 
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout - # now on qa-environment ????
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit -        # ????
    git checkout -                       # ????
    # on feature and ready for more feature commits
    Bash
    # ORIGINAL
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit feature
    git push
    # hack hack hack
    # whoops
    git checkout feature
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout qa-environment
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit feature
    git checkout feature
    # ready for more feature commits

    We cannot use - when cherry-picking a range

    > git cherry-pick origin/-..-
    fatal: bad revision 'origin/-..-'
    
    > git cherry-pick origin/qa-environment..-
    fatal: bad revision 'origin/qa-environment..-'

    and even if we could we'd still have provide the remote's name (here, origin).

    That shorthand doesn't apply in the later reset --hard command, and we cannot use it in the branch -D && checkout approach either. branch -D does not support the - shorthand and once the branch is deleted checkout can't reach it with -:

    # assuming that branch-a has an upstream origin/branch-a
    > git checkout branch-a
    > git checkout branch-b
    > git checkout -
    > git branch -D -
    error: branch '-' not found.
    > git branch -D branch-a
    > git checkout -
    error: pathspec '-' did not match any file(s) known to git

    So we have to remember the remote's name (we know it's origin because we are devoting memory space to knowing that this isn't one of those times it's something else), the remote tracking branch's name, the local branch's name, and we're typing those all out. No good! Let's figure out some shorthands.

    @{-<n>} is hard to say but easy to fall in love with

    We can do a little better by using @{-<n>} (you'll also sometimes see it referred to be the older @{-N}). It is a special construct for referring to the nth previously checked out ref.

    > git checkout branch-a
    > git checkout branch-b
    > git rev-parse --abbrev-rev @{-1} # the name of the previously checked out branch
    branch-a
    > git checkout branch-c
    > git rev-parse --abbrev-rev @{-2} # the name of branch checked out before the previously checked out one
    branch-a

    Back in our scenario, we're on qa-environment, we switch to feature, and then want to refer to qa-environment. That's @{-1}! So instead of

    git cherry-pick origin/qa-environment..qa-environment

    We can do

    git cherry-pick origin/qa-environment..@{-1}

    Here's where we are (🎉 marks wins from -, 💥 marks the win from @{-1})

    Bash
    # USING - AND @{-1}
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit -                # ????
    git push
    # hack hack hack
    # whoops
    git checkout -                               # ????
    git cherry-pick origin/qa-environment..@{-1} # ????
    git push
    git checkout -                               # ????
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit -                # ????
    git checkout -                               # ????
    # ready for more feature commits
    Bash
    # ORIGINAL
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit feature
    git push
    # hack hack hack
    # whoops
    git checkout feature
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout qa-environment
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit feature
    git checkout feature
    # ready for more feature commits

    One down, two to go: we're still relying on memory for the remote's name and the remote branch's name and we're still typing both out in full. Can we replace those with generic shorthands?

    @{-1} is the ref itself, not the ref's name, we can't do

    > git cherry-pick origin/@{-1}..@{-1}
    origin/@{-1}
    fatal: ambiguous argument 'origin/@{-1}': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'

    because there is no branch origin/@{-1}. For the same reason, @{-1} does not give us a generalized shorthand for the scenario's later git reset --hard origin/qa-environment command.

    But good news!

    Do @{u} @{push}

    @{upstream} or its shorthand @{u} is the remote branch a that would be pulled from if git pull were run. @{push} is the remote branch that would be pushed to if git push was run.

    > git checkout branch-a
    Switched to branch 'branch-a'
    Your branch is ahead of 'origin/branch-a' by 3 commits.
      (use "git push" to publish your local commits)
    > git reset --hard origin/branch-a
    HEAD is now at <the SHA origin/branch-a is at>

    we can

    > git checkout branch-a
    Switched to branch 'branch-a'
    Your branch is ahead of 'origin/branch-a' by 3 commits.
      (use "git push" to publish your local commits)
    > git reset --hard @{u}                                # <-- So Cool!
    HEAD is now at <the SHA origin/branch-a is at>

    Tacking either onto a branch name will give that branch's @{upstream} or @{push}. For example

    git checkout branch-a@{u}

    is the branch branch-a pulls from.

    In the common workflow where a branch pulls from and pushes to the same branch, @{upstream} and @{push} will be the same, leaving @{u} as preferable for its terseness. @{push} shines in triangular workflows where you pull from one remote and push to another (see the external links below).

    Going back to our scenario, it means short, portable commands with a minimum human memory footprint. (🎉 marks wins from -, 💥 marks the win from @{-1}, 😎 marks the wins from @{u}.)

    Bash
    # USING - AND @{-1} AND @{u}
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit -    # ????
    git push
    # hack hack hack
    # whoops
    git checkout -                   # ????
    git cherry-pick @{-1}@{u}..@{-1} # ????????
    git push
    git checkout -                   # ????
    git reset --hard @{u}            # ????
    git merge --no-ff --no-edit -    # ????
    git checkout -                   # ????
    # ready for more feature commits
    Bash
    # ORIGINAL
    
    git checkout feature
    # hack hack hack
    git push
    git checkout qa-environment
    git merge --no-ff --no-edit feature
    git push
    # hack hack hack
    # whoops
    git checkout feature
    git cherry-pick origin/qa-environment..qa-environment
    git push
    git checkout qa-environment
    git reset --hard origin/qa-environment
    git merge --no-ff --no-edit feature
    git checkout feature
    # ready for more feature commits

    Make the things you repeat the easiest to do

    Because these commands are generalized, we can run some series of them once, maybe

    git checkout - && git reset --hard @{u} && git checkout -

    or

    git checkout - && git cherry-pick @{-1}@{u}.. @{-1} && git checkout - && git reset --hard @{u} && git checkout -

    and then those will be in the shell history just waiting to be retrieved and run again the next time, whether with CtrlR incremental search or history substring searching bound to the up arrow or however your interactive shell is configured. Or make it an alias, or even better an abbreviation if your interactive shell supports them. Save the body wear and tear, give memory a break, and level up in Git.

    And keep going

    The GitHub blog has a good primer on triangular workflows and how they can polish your process of contributing to external projects.

    The FreeBSD Wiki has a more in-depth article on triangular workflow process (though it doesn't know about @{push} and @{upstream}).

    The construct @{-<n>} and the suffixes @{push} and @{upstream} are all part of the gitrevisions spec. Direct links to each:



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

      ue

      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

      ue

      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.




      ue

      How To Build A Vue Survey App Using Firebase Authentication And Database

      https://www.smashingmagazine.com/2020/05/vue-survey-app-firebase-authentication-database/




      ue

      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.




      ue

      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.




      ue

      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.