com How to Create an Online Ordering Page for Restaurants with WooCommerce By feedproxy.google.com Published On :: Fri, 24 Apr 2020 07:42:25 +0000 Until recently it was something normal for any restaurant to have a well-maintained website. Even so, it seems that for many restaurants this was something difficult to achieve. In these difficult times, for many restaurant owners and other businesses in this field, owning just a simple website is no longer enough. If you still want to remain in business you […] Full Article Tutorials
com Markdown Comes Alive! Part 1, Basic Editor By feedproxy.google.com Published On :: Wed, 26 Feb 2020 08:00:00 -0500 In my last post, I covered what LiveView is at a high level. In this series, we’re going to dive deeper and implement a LiveView powered Markdown editor called Frampton. This series assumes you have some familiarity with Phoenix and Elixir, including having them set up locally. Check out Elizabeth’s three-part series on getting started with Phoenix for a refresher. This series has a companion repository published on GitHub. Get started by cloning it down and switching to the starter branch. You can see the completed application on master. Our goal today is to make a Markdown editor, which allows a user to enter Markdown text on a page and see it rendered as HTML next to it in real-time. We’ll make use of LiveView for the interaction and the Earmark package for rendering Markdown. The starter branch provides some styles and installs LiveView. Rendering Markdown Let’s set aside the LiveView portion and start with our data structures and the functions that operate on them. To begin, a Post will have a body, which holds the rendered HTML string, and title. A string of markdown can be turned into HTML by calling Post.render(post, markdown). I think that just about covers it! First, let’s define our struct in lib/frampton/post.ex: defmodule Frampton.Post do defstruct body: "", title: "" def render(%__MODULE{} = post, markdown) do # Fill me in! end end Now the failing test (in test/frampton/post_test.exs): describe "render/2" do test "returns our post with the body set" do markdown = "# Hello world!" assert Post.render(%Post{}, markdown) == {:ok, %Post{body: "<h1>Hello World</h1> "}} end end Our render method will just be a wrapper around Earmark.as_html!/2 that puts the result into the body of the post. Add {:earmark, "~> 1.4.3"} to your deps in mix.exs, run mix deps.get and fill out render function: def render(%__MODULE{} = post, markdown) do html = Earmark.as_html!(markdown) {:ok, Map.put(post, :body, html)} end Our test should now pass, and we can render posts! [Note: we’re using the as_html! method, which prints error messages instead of passing them back to the user. A smarter version of this would handle any errors and show them to the user. I leave that as an exercise for the reader…] Time to play around with this in an IEx prompt (run iex -S mix in your terminal): iex(1)> alias Frampton.Post Frampton.Post iex(2)> post = %Post{} %Frampton.Post{body: "", title: ""} iex(3)> {:ok, updated_post} = Post.render(post, "# Hello world!") {:ok, %Frampton.Post{body: "<h1>Hello world!</h1> ", title: ""}} iex(4)> updated_post %Frampton.Post{body: "<h1>Hello world!</h1> ", title: ""} Great! That’s exactly what we’d expect. You can find the final code for this in the render_post branch. LiveView Editor Now for the fun part: Editing this live! First, we’ll need a route for the editor to live at: /editor sounds good to me. LiveViews can be rendered from a controller, or directly in the router. We don’t have any initial state, so let's go straight from a router. First, let's put up a minimal test. In test/frampton_web/live/editor_live_test.exs: defmodule FramptonWeb.EditorLiveTest do use FramptonWeb.ConnCase import Phoenix.LiveViewTest test "the editor renders" do conn = get(build_conn(), "/editor") assert html_response(conn, 200) =~ "data-test="editor"" end end This test doesn’t do much yet, but notice that it isn’t live view specific. Our first render is just the same as any other controller test we’d write. The page’s content is there right from the beginning, without the need to parse JavaScript or make API calls back to the server. Nice. To make that test pass, add a route to lib/frampton_web/router.ex. First, we import the LiveView code, then we render our Editor: import Phoenix.LiveView.Router # … Code skipped ... # Inside of `scope "/"`: live "/editor", EditorLive Now place a minimal EditorLive module, in lib/frampton_web/live/editor_live.ex: defmodule FramptonWeb.EditorLive do use Phoenix.LiveView def render(assigns) do ~L""" <div data-test=”editor”> <h1>Hello world!</h1> </div> """ end def mount(_params, _session, socket) do {:ok, socket} end end And we have a passing test suite! The ~L sigil designates that LiveView should track changes to the content inside. We could keep all of our markup in this render/1 method, but let’s break it out into its own template for demonstration purposes. Move the contents of render into lib/frampton_web/templates/editor/show.html.leex, and replace EditorLive.render/1 with this one liner: def render(assigns), do: FramptonWeb.EditorView.render("show.html", assigns). And finally, make an EditorView module in lib/frampton_web/views/editor_view.ex: defmodule FramptonWeb.EditorView do use FramptonWeb, :view import Phoenix.LiveView end Our test should now be passing, and we’ve got a nicely separated out template, view and “live” server. We can keep markup in the template, helper functions in the view, and reactive code on the server. Now let’s move forward to actually render some posts! Handling User Input We’ve got four tasks to accomplish before we are done: Take markdown input from the textarea Send that input to the LiveServer Turn that raw markdown into HTML Return the rendered HTML to the page. Event binding To start with, we need to annotate our textarea with an event binding. This tells the liveview.js framework to forward DOM events to the server, using our liveview channel. Open up lib/frampton_web/templates/editor/show.html.leex and annotate our textarea: <textarea phx-keyup="render_post"></textarea> This names the event (render_post) and sends it on each keyup. Let’s crack open our web inspector and look at the web socket traffic. Using Chrome, open the developer tools, navigate to the network tab and click WS. In development you’ll see two socket connections: one is Phoenix LiveReload, which polls your filesystem and reloads pages appropriately. The second one is our LiveView connection. If you let it sit for a while, you’ll see that it's emitting a “heartbeat” call. If your server is running, you’ll see that it responds with an “ok” message. This lets LiveView clients know when they've lost connection to the server and respond appropriately. Now, type some text and watch as it sends down each keystroke. However, you’ll also notice that the server responds with a “phx_error” message and wipes out our entered text. That's because our server doesn’t know how to handle the event yet and is throwing an error. Let's fix that next. Event handling We’ll catch the event in our EditorLive module. The LiveView behavior defines a handle_event/3 callback that we need to implement. Open up lib/frampton_web/live/editor_live.ex and key in a basic implementation that lets us catch events: def handle_event("render_post", params, socket) do IO.inspect(params) {:noreply, socket} end The first argument is the name we gave to our event in the template, the second is the data from that event, and finally the socket we’re currently talking through. Give it a try, typing in a few characters. Look at your running server and you should see a stream of events that look something like this: There’s our keystrokes! Next, let’s pull out that value and use it to render HTML. Rendering Markdown Lets adjust our handle_event to pattern match out the value of the textarea: def handle_event("render_post", %{"value" => raw}, socket) do Now that we’ve got the raw markdown string, turning it into HTML is easy thanks to the work we did earlier in our Post module. Fill out the body of the function like this: {:ok, post} = Post.render(%Post{}, raw) IO.inspect(post) If you type into the textarea you should see output that looks something like this: Perfect! Lastly, it’s time to send that rendered html back to the page. Returning HTML to the page In a LiveView template, we can identify bits of dynamic data that will change over time. When they change, LiveView will compare what has changed and send over a diff. In our case, the dynamic content is the post body. Open up show.html.leex again and modify it like so: <div class="rendered-output"> <%= @post.body %> </div> Refresh the page and see: Whoops! The @post variable will only be available after we put it into the socket’s assigns. Let’s initialize it with a blank post. Open editor_live.ex and modify our mount/3 function: def mount(_params, _session, socket) do post = %Post{} {:ok, assign(socket, post: post)} end In the future, we could retrieve this from some kind of storage, but for now, let's just create a new one each time the page refreshes. Finally, we need to update the Post struct with user input. Update our event handler like this: def handle_event("render_post", %{"value" => raw}, %{assigns: %{post: post}} = socket) do {:ok, post} = Post.render(post, raw) {:noreply, assign(socket, post: post) end Let's load up http://localhost:4000/editor and see it in action. Nope, that's not quite right! Phoenix won’t render this as HTML because it’s unsafe user input. We can get around this (very good and useful) security feature by wrapping our content in a raw/1 call. We don’t have a database and user processes are isolated from each other by Elixir. The worst thing a malicious user could do would be crash their own session, which doesn’t bother me one bit. Check the edit_posts branch for the final version. Conclusion That’s a good place to stop for today. We’ve accomplished a lot! We’ve got a dynamically rendering editor that takes user input, processes it and updates the page. And we haven’t written any JavaScript, which means we don’t have to maintain or update any JavaScript. Our server code is built on the rock-solid foundation of the BEAM virtual machine, giving us a great deal of confidence in its reliability and resilience. In the next post, we’ll tackle making a shared editor, allowing multiple users to edit the same post. This project will highlight Elixir’s concurrency capabilities and demonstrate how LiveView builds on them to enable some incredible user experiences. Full Article Code Back-end Engineering
com Committed to the wrong branch? -, @{upstream}, and @{-1} to the rescue By feedproxy.google.com Published On :: Thu, 27 Feb 2020 00:00:00 -0500 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 longevityI like to use all possible natively supported shorthands. There are two broad motivations for that.Fingers have a limited number of movements in them. Save as many as possible left late in life.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 Switch 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 withWe 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 Switch 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 Switch Make the things you repeat the easiest to doBecause 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 goingThe 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:@{-<n>}@{push}@{upstream} Full Article Code Front-end Engineering Back-end Engineering
com CLI Equivalents for Common MAMP PRO and Sequel Pro Tasks By feedproxy.google.com Published On :: Thu, 26 Mar 2020 00:00:00 -0400 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. Full Article Code Front-end Engineering Back-end Engineering
com Coming Soon: Premium Blogstarter By www.wpthemedesigner.com Published On :: Sat, 09 Apr 2011 19:27:07 +0000 We’ve upgraded one of our most popular themes. The Blogstarter Theme has been one of our most popular themes from the beginning. Premium Blogstarter contains a modernized design with all the current features you’d expect like social media integration, widgetized footer, and much more. Here’s a preview of what is to come. The post Coming Soon: Premium Blogstarter appeared first on WP Theme Designer. Full Article Blog Premium Themes
com Best WooCommerce Themes By www.wpthemedesigner.com Published On :: Sat, 02 Jan 2016 20:07:07 +0000 Savoy And here comes Savoy, the latest trending WordPress theme for creating interactive online stores. Powered by AJAX technology, the simple and elegant design of the theme delivers the best possible user experience for the customers. Powered by WooCommerce, Savoy enables you to manage various options of your online shop from one location. The perfectly […] The post Best WooCommerce Themes appeared first on WP Theme Designer. Full Article Blog
com There is no longer any such thing as Computer Security By blog.codinghorror.com Published On :: Fri, 21 Sep 2018 09:50:53 GMT Remember "cybersecurity"? Mysterious hooded computer guys doing mysterious hooded computer guy .. things! Who knows what kind of naughty digital mischief they might be up to? Unfortunately, we now live in a world where this kind of digital mischief is literally rewriting the world's history. For proof of that, Full Article
com The Cloud Is Just Someone Else's Computer By blog.codinghorror.com Published On :: Sun, 17 Feb 2019 02:15:26 GMT When we started Discourse in 2013, our server requirements were high: 1GB RAM modern, fast dual core CPU speedy solid state drive with 20+ GB I'm not talking about a cheapo shared cpanel server, either, I mean a dedicated virtual private server with those specifications. We were OK with that, Full Article
com Fort Myers Beach Website Launch – Matanzas.com By feedproxy.google.com Published On :: Wed, 03 Feb 2016 16:52:49 +0000 We recently completed a bright and engaging new website for one of Fort Myers Beach’s most popular and well known...continue reading Full Article Featured Fort Myers Web Design Southwest Florida Web Design Website Launches Wordpress Marketing Fort Myers restaurant web design wordpress
com New Project Launch: Sanibel Communities for Clean Water By feedproxy.google.com Published On :: Tue, 11 Jul 2017 19:37:32 +0000 We created the program identity and website for this City of Sanibel initiative. Full Article Featured Graphic / Print Design Logo Design Southwest Florida Web Design Website Launches Wordpress logo design Sanibel Web Design
com Design Sprints Complete Guide By blog.useberry.com Published On :: Sat, 09 May 2020 04:15:16 PDT https://blog.useberry.com/design-sprints-complete-guide/ Full Article
com Support Communication During Conversation By feedproxy.google.com Published On :: Wednesday, April 29, 2020 - 12:54pm Full Article
com View Mac Calendar from Command Line By feedproxy.google.com Published On :: Mon, 24 Feb 2020 12:28:44 +0000 As someone that loves using UI tools, I do pride myself in learning how to accomplish the same feats from command line. Don’t believe me? Check out my Command Line tutorials section — I guarantee you’ll learn quite a bit. Recently I learned that you can view basic calendars from command line with the cal […] The post View Mac Calendar from Command Line appeared first on David Walsh Blog. Full Article Shell
com How to Set a Default Commit Message By feedproxy.google.com Published On :: Mon, 02 Mar 2020 15:23:46 +0000 Having a default commit message is really useful for a number of reasons: It can formalize your commit messages It serves as a good reminder for the information you should add to your commit message, like issue number If you set it to “Drunk AF, don’t accept this” To set a default commit message on […] The post How to Set a Default Commit Message appeared first on David Walsh Blog. Full Article git Quick Tips Shell
com 5 Essential git Commands and Utilities By feedproxy.google.com Published On :: Thu, 26 Mar 2020 16:20:37 +0000 For many of us, git and GitHub play a huge role in our development workflows. Whenever we have a tool that we need to use often, the more fine-tuned we can make that tool, the faster we can get things done. The following are five git commands or helpers that can make your developer life […] The post 5 Essential git Commands and Utilities appeared first on David Walsh Blog. Full Article git
com 3 Common Photography Mistakes To Avoid By feedproxy.google.com Published On :: Fri, 22 Jan 2016 19:13:00 +0000 Image from Wikimedia With photography and image-based social media flourishing, there’s no better time to get into this amazing hobby. Although many people do just fine with little or no guidance, there are certain common mistakes which a lot of rookies run into. To give you a better start in the world of photography, you need to keep a keen eye out for these slip-ups. Here are three of the most widespread. If you want to pursue photography as a career, then one of the worst things you can do is neglect to learn the jargon. I’ve met more than a few photographers who have a natural talent. Without playing with any settings or even glancing at the subject, they get shots which make even the blandest scenes look incredible. With some of these protégés, I’ve been totally shocked at how little technical knowledge they have. A good photographer is ... Read more The post 3 Common Photography Mistakes To Avoid appeared first on Digital Photography Tutorials. Full Article Tips and Tricks Common Photography Mistakes To Avoid new photographers photographers world of photography
com Themify Shoppe – The Ultimate WooCommerce WordPress Theme By webdesignerwall.com Published On :: Wed, 15 Feb 2017 17:52:16 +0000 I’m excited to announce that Themify has released another awesome theme – Themify Shoppe. Designed by Liam McKay and coded by Themify team, Shoppe works hand-in-hand with WooCommerce, making it the ultimate multi-purpose eCommerce theme. It features the popular drag and drop Themify Builder that can help you design and build your online store to […] The post Themify Shoppe – The Ultimate WooCommerce WordPress Theme appeared first on Web Designer Wall. Full Article General Stuff
com Common WordPress Errors & How to Fix Them By webdesignerwall.com Published On :: Thu, 28 Feb 2019 11:00:47 +0000 WordPress is an amazingly stable platform thanks to the dedication and talent of the hundreds of professionals contributing to it, and the strict code standards they follow. Even so, the huge variety of themes, plugins and server environments out there make it difficult to guarantee nothing will ever go wrong. This guide will help you […] The post Common WordPress Errors & How to Fix Them appeared first on Web Designer Wall. Full Article Tutorials WordPress
com Sony Xperia Z1 Compact Complete Guide By unlimitedcellphoneplansblog.wordpress.com Published On :: Mon, 07 Mar 2016 12:08:20 +0000 Have you got yourself a Sony Xperia Z1 Compact but not sure how to do something on it? Don’t worry, we’ve come up with a comprehensive guide for all the things your handset is capable of. Navigate the various sections using the links below. If you can’t find what you’re looking for just leave a … Continue reading Sony Xperia Z1 Compact Complete Guide → Full Article Uncategorized
com Motorola Moto X complete guide By unlimitedcellphoneplansblog.wordpress.com Published On :: Mon, 07 Mar 2016 12:09:50 +0000 Got a brand new Motorola Moto X but not sure how to do something on it? Fear not as we’ve put together a comprehensive guide to get your started. Scroll through or navigate using the links below, and if you’ve got a query and we havne’t covered it, let us know. Leave us a comment … Continue reading Motorola Moto X complete guide → Full Article Uncategorized
com Motorola Moto G Complete Guide By unlimitedcellphoneplansblog.wordpress.com Published On :: Mon, 07 Mar 2016 12:11:22 +0000 Got a Motorola Moto G but not sure how to do something on it? Not to worry as we’ve come up with a comprehensive guide for all the things your handset is capable of doing. Navigate using the links below or download the full guide by clicking on the PDF logo. If you can’t find … Continue reading Motorola Moto G Complete Guide → Full Article Uncategorized
com 7 Vital Components of a Successful Brand Strategy By justcreative.com Published On :: Fri, 08 May 2020 06:20:02 +0000 A brand strategy is a long-term plan that affects every facet of your business, but creating one can be confusing. We break it down into 7 essential components. Full Article Branding Guest Articles brBrand Strategy
com Disney Princesses Comic Book Style By icanbecreative.com Published On :: Sun, 26 Apr 2020 15:56:22 PDT What happens when you mash-up Disney princesses with Marvel Super Heros, artist cartooncookie did an excellent job creating this mix: Marvel x Disney Princesses: a celebration of the X-Men joining... Full Article Design Roud-up
com Comparing Covid-19 models By flowingdata.com Published On :: Tue, 05 May 2020 07:44:30 +0000 FiveThirtyEight compared six Covid-19 models for a sense of where we might be…Tags: coronavirus, FiveThirtyEight, modeling Full Article Statistics coronavirus FiveThirtyEight modeling
com Markdown Comes Alive! Part 1, Basic Editor By feedproxy.google.com Published On :: Wed, 26 Feb 2020 08:00:00 -0500 In my last post, I covered what LiveView is at a high level. In this series, we’re going to dive deeper and implement a LiveView powered Markdown editor called Frampton. This series assumes you have some familiarity with Phoenix and Elixir, including having them set up locally. Check out Elizabeth’s three-part series on getting started with Phoenix for a refresher. This series has a companion repository published on GitHub. Get started by cloning it down and switching to the starter branch. You can see the completed application on master. Our goal today is to make a Markdown editor, which allows a user to enter Markdown text on a page and see it rendered as HTML next to it in real-time. We’ll make use of LiveView for the interaction and the Earmark package for rendering Markdown. The starter branch provides some styles and installs LiveView. Rendering Markdown Let’s set aside the LiveView portion and start with our data structures and the functions that operate on them. To begin, a Post will have a body, which holds the rendered HTML string, and title. A string of markdown can be turned into HTML by calling Post.render(post, markdown). I think that just about covers it! First, let’s define our struct in lib/frampton/post.ex: defmodule Frampton.Post do defstruct body: "", title: "" def render(%__MODULE{} = post, markdown) do # Fill me in! end end Now the failing test (in test/frampton/post_test.exs): describe "render/2" do test "returns our post with the body set" do markdown = "# Hello world!" assert Post.render(%Post{}, markdown) == {:ok, %Post{body: "<h1>Hello World</h1> "}} end end Our render method will just be a wrapper around Earmark.as_html!/2 that puts the result into the body of the post. Add {:earmark, "~> 1.4.3"} to your deps in mix.exs, run mix deps.get and fill out render function: def render(%__MODULE{} = post, markdown) do html = Earmark.as_html!(markdown) {:ok, Map.put(post, :body, html)} end Our test should now pass, and we can render posts! [Note: we’re using the as_html! method, which prints error messages instead of passing them back to the user. A smarter version of this would handle any errors and show them to the user. I leave that as an exercise for the reader…] Time to play around with this in an IEx prompt (run iex -S mix in your terminal): iex(1)> alias Frampton.Post Frampton.Post iex(2)> post = %Post{} %Frampton.Post{body: "", title: ""} iex(3)> {:ok, updated_post} = Post.render(post, "# Hello world!") {:ok, %Frampton.Post{body: "<h1>Hello world!</h1> ", title: ""}} iex(4)> updated_post %Frampton.Post{body: "<h1>Hello world!</h1> ", title: ""} Great! That’s exactly what we’d expect. You can find the final code for this in the render_post branch. LiveView Editor Now for the fun part: Editing this live! First, we’ll need a route for the editor to live at: /editor sounds good to me. LiveViews can be rendered from a controller, or directly in the router. We don’t have any initial state, so let's go straight from a router. First, let's put up a minimal test. In test/frampton_web/live/editor_live_test.exs: defmodule FramptonWeb.EditorLiveTest do use FramptonWeb.ConnCase import Phoenix.LiveViewTest test "the editor renders" do conn = get(build_conn(), "/editor") assert html_response(conn, 200) =~ "data-test="editor"" end end This test doesn’t do much yet, but notice that it isn’t live view specific. Our first render is just the same as any other controller test we’d write. The page’s content is there right from the beginning, without the need to parse JavaScript or make API calls back to the server. Nice. To make that test pass, add a route to lib/frampton_web/router.ex. First, we import the LiveView code, then we render our Editor: import Phoenix.LiveView.Router # … Code skipped ... # Inside of `scope "/"`: live "/editor", EditorLive Now place a minimal EditorLive module, in lib/frampton_web/live/editor_live.ex: defmodule FramptonWeb.EditorLive do use Phoenix.LiveView def render(assigns) do ~L""" <div data-test=”editor”> <h1>Hello world!</h1> </div> """ end def mount(_params, _session, socket) do {:ok, socket} end end And we have a passing test suite! The ~L sigil designates that LiveView should track changes to the content inside. We could keep all of our markup in this render/1 method, but let’s break it out into its own template for demonstration purposes. Move the contents of render into lib/frampton_web/templates/editor/show.html.leex, and replace EditorLive.render/1 with this one liner: def render(assigns), do: FramptonWeb.EditorView.render("show.html", assigns). And finally, make an EditorView module in lib/frampton_web/views/editor_view.ex: defmodule FramptonWeb.EditorView do use FramptonWeb, :view import Phoenix.LiveView end Our test should now be passing, and we’ve got a nicely separated out template, view and “live” server. We can keep markup in the template, helper functions in the view, and reactive code on the server. Now let’s move forward to actually render some posts! Handling User Input We’ve got four tasks to accomplish before we are done: Take markdown input from the textarea Send that input to the LiveServer Turn that raw markdown into HTML Return the rendered HTML to the page. Event binding To start with, we need to annotate our textarea with an event binding. This tells the liveview.js framework to forward DOM events to the server, using our liveview channel. Open up lib/frampton_web/templates/editor/show.html.leex and annotate our textarea: <textarea phx-keyup="render_post"></textarea> This names the event (render_post) and sends it on each keyup. Let’s crack open our web inspector and look at the web socket traffic. Using Chrome, open the developer tools, navigate to the network tab and click WS. In development you’ll see two socket connections: one is Phoenix LiveReload, which polls your filesystem and reloads pages appropriately. The second one is our LiveView connection. If you let it sit for a while, you’ll see that it's emitting a “heartbeat” call. If your server is running, you’ll see that it responds with an “ok” message. This lets LiveView clients know when they've lost connection to the server and respond appropriately. Now, type some text and watch as it sends down each keystroke. However, you’ll also notice that the server responds with a “phx_error” message and wipes out our entered text. That's because our server doesn’t know how to handle the event yet and is throwing an error. Let's fix that next. Event handling We’ll catch the event in our EditorLive module. The LiveView behavior defines a handle_event/3 callback that we need to implement. Open up lib/frampton_web/live/editor_live.ex and key in a basic implementation that lets us catch events: def handle_event("render_post", params, socket) do IO.inspect(params) {:noreply, socket} end The first argument is the name we gave to our event in the template, the second is the data from that event, and finally the socket we’re currently talking through. Give it a try, typing in a few characters. Look at your running server and you should see a stream of events that look something like this: There’s our keystrokes! Next, let’s pull out that value and use it to render HTML. Rendering Markdown Lets adjust our handle_event to pattern match out the value of the textarea: def handle_event("render_post", %{"value" => raw}, socket) do Now that we’ve got the raw markdown string, turning it into HTML is easy thanks to the work we did earlier in our Post module. Fill out the body of the function like this: {:ok, post} = Post.render(%Post{}, raw) IO.inspect(post) If you type into the textarea you should see output that looks something like this: Perfect! Lastly, it’s time to send that rendered html back to the page. Returning HTML to the page In a LiveView template, we can identify bits of dynamic data that will change over time. When they change, LiveView will compare what has changed and send over a diff. In our case, the dynamic content is the post body. Open up show.html.leex again and modify it like so: <div class="rendered-output"> <%= @post.body %> </div> Refresh the page and see: Whoops! The @post variable will only be available after we put it into the socket’s assigns. Let’s initialize it with a blank post. Open editor_live.ex and modify our mount/3 function: def mount(_params, _session, socket) do post = %Post{} {:ok, assign(socket, post: post)} end In the future, we could retrieve this from some kind of storage, but for now, let's just create a new one each time the page refreshes. Finally, we need to update the Post struct with user input. Update our event handler like this: def handle_event("render_post", %{"value" => raw}, %{assigns: %{post: post}} = socket) do {:ok, post} = Post.render(post, raw) {:noreply, assign(socket, post: post) end Let's load up http://localhost:4000/editor and see it in action. Nope, that's not quite right! Phoenix won’t render this as HTML because it’s unsafe user input. We can get around this (very good and useful) security feature by wrapping our content in a raw/1 call. We don’t have a database and user processes are isolated from each other by Elixir. The worst thing a malicious user could do would be crash their own session, which doesn’t bother me one bit. Check the edit_posts branch for the final version. Conclusion That’s a good place to stop for today. We’ve accomplished a lot! We’ve got a dynamically rendering editor that takes user input, processes it and updates the page. And we haven’t written any JavaScript, which means we don’t have to maintain or update any JavaScript. Our server code is built on the rock-solid foundation of the BEAM virtual machine, giving us a great deal of confidence in its reliability and resilience. In the next post, we’ll tackle making a shared editor, allowing multiple users to edit the same post. This project will highlight Elixir’s concurrency capabilities and demonstrate how LiveView builds on them to enable some incredible user experiences. Full Article Code Back-end Engineering
com Committed to the wrong branch? -, @{upstream}, and @{-1} to the rescue By feedproxy.google.com Published On :: Thu, 27 Feb 2020 00:00:00 -0500 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 longevityI like to use all possible natively supported shorthands. There are two broad motivations for that.Fingers have a limited number of movements in them. Save as many as possible left late in life.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 Switch 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 withWe 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 Switch 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 Switch Make the things you repeat the easiest to doBecause 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 goingThe 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:@{-<n>}@{push}@{upstream} Full Article Code Front-end Engineering Back-end Engineering
com CLI Equivalents for Common MAMP PRO and Sequel Pro Tasks By feedproxy.google.com Published On :: Thu, 26 Mar 2020 00:00:00 -0400 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. Full Article Code Front-end Engineering Back-end Engineering
com Illustrator Tutorial: How to Create a Simple Computer Icon By feedproxy.google.com Published On :: Fri, 12 Apr 2019 14:50:36 +0000 In today’s tutorial, we're going to take a close look behind the process of creating a simple computer icon, and see how easy it is to build one of our one using nothing more than some basic geometric shapes. 1. Set Up a New Project File As with any new project, we’re going to kick […] The post Illustrator Tutorial: How to Create a Simple Computer Icon appeared first on Bittbox. Full Article How To Illustrator adobe illustrator computer icon Featured flat icon icon Vector vector icon
com Vert.x ramblings: Asynchronous network, your time has come By feedproxy.google.com Published On :: Sat, 19 May 2012 02:00:24 +0000 With the debut of Vert.x, the asynchronous framework is reaching an inflection point, suggests Andrew Cholakian. With Vert.x, the software is packaged together in such a way as to be extremely practical, he states. For some JVM zealots, Vert.x may meet needs recently and apparently addressed by node.js. Vert.x is an asynchronous application server – Read the rest... Full Article Front Page Node
com Upcoming: Google IO By feedproxy.google.com Published On :: Fri, 22 Jun 2012 02:57:49 +0000 At Google IO June 27-29 the Android platform will be on display. Direct from a recent slamdown legal court grudge win against Java steward Oracle, the Android crew will be able to tell you about what is new and what is upcoming in Android, how you can monetize Google apps, multiversioning and more. Much will Read the rest... Full Article Android Front Page
com Here comes Traversty traversing the DOM By feedproxy.google.com Published On :: Fri, 02 Nov 2012 01:59:37 +0000 The Traversty DOM utility has as its purpose to allow you to traverse the DOM and manage collections of DOM elements. Proponents admit core Traversty traversal methods are inspired by Prototype’s DOM Traversal toolkit, but now in a multi-element environment that is more like jQuery and less like Prototype’s single element implementation. Full Article Front Page JavaScript
com 5 Key Components of a Highly Converting Landing Page By wphacks.com Published On :: Wed, 05 Feb 2020 08:00:00 +0000 A landing page can be the difference between having a strong conversion rate and a bad one. After putting a […] The post 5 Key Components of a Highly Converting Landing Page appeared first on WPHacks. Full Article Beginners Guide boost conversions email list building landing page
com 40 Examples of Sites Using WooCommerce By wphacks.com Published On :: Tue, 18 Feb 2020 08:00:00 +0000 Are you on the hunt for the ideal eCommerce solution? There are plenty of tools on the market today that […] The post 40 Examples of Sites Using WooCommerce appeared first on WPHacks. Full Article Plugins online store woocommerce
com Squared Circle Pit #55 - Comic Artist Box Brown Talks AEW vs. NXT By feedproxy.google.com Published On :: Fri, 04 Oct 2019 21:59:08 +0000 Comic artist Box Brown is the guest on the show this week. We kick things off talking about his comic... The post Squared Circle Pit #55 - Comic Artist Box Brown Talks AEW vs. NXT appeared first on Metal Injection. Full Article SquaredCirclePit aew all elite wrestling box brown wrestlemetal wwe wwe nxt
com METAL INJECTION LIVECAST #551 - Where Nickelback Shines with special guest Comedian Brian Posehn By feedproxy.google.com Published On :: Wed, 22 Jan 2020 03:00:18 +0000 We're so excited to have a huge guest on the show – big time comedian and noted metalhead, Brian Posehn,... The post METAL INJECTION LIVECAST #551 - Where Nickelback Shines with special guest Comedian Brian Posehn appeared first on Metal Injection. Full Article Metal Injection Livecast
com Star Wars Size Comparison Video By feedproxy.google.com Published On :: Tue, 22 Oct 2019 16:18:37 +0000 The galaxy far far away has items both big and small. The Star Wars Size Comparison Video created by MetaBallStudios brings droids, people and planets together from the Star Wars movies (episode I to VIII, Rogue One and Solo). See how your favorites size up against each other.Comparison of many things from the Star Wars movies. Only movies from episode I to VIII, Rogue One and Solo. Obviously not everything appears, only the most representative.Providing scale and context to your audience is one of the key tenets of data visualization, and this video does a fantastic job of giving you the context of the size of everything in the Star Wars universe.Found on Gizmodo.com. Full Article
com DataViz Community COVID-19 Resources By feedproxy.google.com Published On :: Mon, 13 Apr 2020 16:07:55 +0000 Not an infographic today.Free online classes, discounts on software, extended trial periods, free online data sources, etc. as a result of the COVID-19 pandemic.As the Organizer for the DFW Data Visualization Meetup Group, I've started this publicly viewable Google Sheet for the local DataViz community listing various resources that companies are making available during the pandemic. Turns out, these are valuable to DataViz designers everywhere, not just DFW, so I'm sharing the link with all of you. I’ll continue to update this list as I learn about new resources during the pandemic. Please use the submission link in the spreadsheet if you know of any DataViz-related offers or deals I should add!-Randy Full Article
com ‘Coming Mass Extinction’ Caused by Human Destruction Could Wipe Out 1 Million Species, Warns UN Draft Report By feedproxy.google.com Published On :: Tue, 23 Apr 2019 18:47:43 +0000 By Jessica Corbett Common Dreams Far-reaching global assessment details how humanity is undermining the very foundations of the natural world On the heels of an Earth Day that featured calls for radical action to address the current “age … Continue reading → Full Article Endangered Species ET News mass extinction UN Report
com New EPA Web Portal Helps Communities Prepare for Climate Change By feedproxy.google.com Published On :: Thu, 06 Oct 2016 19:18:57 +0000 By The EPA The U.S. Environmental Protection Agency (EPA) today launched a new online portal that will provide local leaders in the nation’s 40,000 communities with information and tools to increase resilience to climate change. Using a self-guided format, the … Continue reading → Full Article Climate & Climate Change ET News climate adaptation Climate Change EPA
com ‘Coming Mass Extinction’ Caused by Human Destruction Could Wipe Out 1 Million Species, Warns UN Draft Report By feedproxy.google.com Published On :: Tue, 23 Apr 2019 18:47:43 +0000 By Jessica Corbett Common Dreams Far-reaching global assessment details how humanity is undermining the very foundations of the natural world On the heels of an Earth Day that featured calls for radical action to address the current “age … Continue reading → Full Article Endangered Species ET News mass extinction UN Report
com Talking to computers (part 1): Why is speech recognition so difficult? By feedproxy.google.com Published On :: Thu, 3 Jun 2019 08:31:15 GMT Although the performance of today's speech recognition systems is impressive, the experience for many is still one of errors, corrections, frustration and abandoning speech in favour of alternative interaction methods. We take a closer look at speech and find out why speech recognition is so difficult. Full Article
com Talking to computers (part 2): VUI as an error recovery system By feedproxy.google.com Published On :: Mon, 1 Jul 2019 08:21:51 GMT I take a closer look at some unavoidable challenges to effective speech recognition, and I discuss why you may want to think twice before designing dialogue that is 'conversational' and 'natural'. I also offer five important questions that I think should form the basis of any VUI design kick-off meeting. Full Article
com Common traps in user needs research and how to avoid them By feedproxy.google.com Published On :: Mon, 4 Nov 2019 07:31:22 GMT Whether you call it a field visit, a contextual inquiry or a customer discovery interview, the goal of early stage research is the same: to uncover users' needs. Here are 5 mistakes I've seen crop up time and again in this kind of research. Full Article
com 10 Best Restaurant Menu Plugins for WordPress (Compared) By www.isitwp.com Published On :: Fri, 24 Apr 2020 05:08:24 +0000 Want to add a food menu to your restaurant website? Publishing your restaurant menu on your website comes in handy especially if you’re providing an online restaurant reservation or online food delivery. That way your users can figure out the available food options without having to walk into your restaurant. In this article, we’ll show […] The post 10 Best Restaurant Menu Plugins for WordPress (Compared) appeared first on IsItWP - Free WordPress Theme Detector. Full Article WordPress Plugins food ordering restaurant menu plugins resturant website
com How to Create a Full-Screen Welcome Mat Optin Form in WordPress By www.isitwp.com Published On :: Tue, 28 Apr 2020 07:27:00 +0000 Want to create a full-screen optin form in WordPress? Love it or hate it… using a welcome mat is one of the easiest ways to capture your users’ attention. Even big brands like Forbes use a welcome mat to promote their campaigns. In this article, we’ll show you how to properly create a welcome mat […] The post How to Create a Full-Screen Welcome Mat Optin Form in WordPress appeared first on IsItWP - Free WordPress Theme Detector. Full Article WordPress Tutorials create a welcome mat create a welcome mat in wordpress optinmonster welcome mat for users welcome mat in wordpress
com 9 Best Staging Plugins for Your WordPress Website (Compared) By www.isitwp.com Published On :: Tue, 05 May 2020 07:06:53 +0000 Are you looking for a good staging plugin to test your experiments before it goes live? A staging site is a replica of your website where you can experiment with new features, plugins, and updates before you push them to your live website. That way you can find and fix bugs without having to worry […] The post 9 Best Staging Plugins for Your WordPress Website (Compared) appeared first on IsItWP - Free WordPress Theme Detector. Full Article WordPress Plugins best staging plugin best wordpress staging plugins
com WPForms vs. Google Forms – Which One is Best? (Compared) By www.isitwp.com Published On :: Fri, 08 May 2020 14:16:23 +0000 Looking to build an online form on your WordPress site? Not sure whether you should use WPForms or Google Forms? Both WPForms and Google Forms are two great options for small and medium scale businesses. But when you dig deeper, you’ll find a few key differences between these 2 form builders. To help you find […] The post WPForms vs. Google Forms – Which One is Best? (Compared) appeared first on IsItWP - Free WordPress Theme Detector. Full Article WordPress Plugins form builders wpforms vs google forms wpforms vs google forms comparison
com Using Funds from Disability Compensation and the GI Bill for Going Back to School By feedproxy.google.com Published On :: Mon, 11 Nov 2013 00:00:00 EST Receiving service-related disability compensation does not interfere with the funds veterans receive from the GI Bill, explains Adam. Full Article
com Using Communities to Further the True Meaning of Resiliency By feedproxy.google.com Published On :: Mon, 23 Dec 2013 00:00:00 EST Service members, veterans, and their caregivers are incredibly resilient, says Adam, but learning to connect with whatever community you are in will only strengthen that resiliency. Full Article
com Inform user about automatic comment closing time By wpengineer.com Published On :: Thu, 26 Jun 2014 09:00:27 +0000 To prevent spammers from flooding old articles with useless comments you can set WordPress to close comments after a certain […] Full Article WordPress Hacks comments