DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Low-Code Development: Leverage low and no code to streamline your workflow so that you can focus on higher priorities.

DZone Security Research: Tell us your top security strategies in 2024, influence our research, and enter for a chance to win $!

Launch your software development career: Dive head first into the SDLC and learn how to build high-quality software and teams.

Open Source Migration Practices and Patterns: Explore key traits of migrating open-source software and its impact on software development.

Avatar

Lorna Mitchell

Developer Advocate at Aiven

Leeds, GB

Joined Sep 2008

https://lornajane.net

About

Lorna is based in Yorkshire, UK; she is VP of Developer Experience at Redocly as well as a published author and experienced conference speaker. Lorna is passionate about open source technologies and sharing knowledge, code and experiences with developers everywhere. In her spare time, she blogs at http://lornajane.net.

Stats

Reputation: 1464
Pageviews: 839.6K
Articles: 12
Comments: 0
  • Articles
  • Refcards
  • Trend Reports

Articles

article thumbnail
Handy Beanstalkd Admin Console
A developer shares her experiences using this open source solution for creating queues in web applications. Read on to get her take!
April 12, 2019
· 22,761 Views · 1 Like
article thumbnail
Vim Settings for Working With YAML [Snippet]
Let's take a look at a short tutorial that gives an explanation of the vim settings for working with YAML.
November 7, 2018
· 18,471 Views · 1 Like
article thumbnail
Make a POST Request from PHP With Guzzle
If you make server-side requests to external APIs using PHP, then check this out. It isn't a new thing with PHP, and this post targets newer versions of PHP.
Updated September 19, 2018
· 72,258 Views · 1 Like
article thumbnail
Using Config Files With ngrok
Want to learn more about using ngork? Check out this tutorial on how to use config files with ngork for testing locally on your applications.
August 14, 2018
· 13,166 Views · 1 Like
article thumbnail
Handling Incoming Webhooks in PHP
In this article, one dev shares her opinions on handling webhooks and provides some sample code in PHP to show how she usually does it.
August 14, 2017
· 25,990 Views · 4 Likes
article thumbnail
RETURNING in PostgreSQL
Here's a quick overview about using the RETURNING keyword in PostgreSQL, letting you return values from after you run your insert or update statements.
November 18, 2016
· 20,024 Views · 2 Likes
article thumbnail
Connect to RabbitMQ From PHP Over AMQPS
Check out this step-by-step guide to put together the puzzle of deploying to a hosted RabbitMQ service.
August 16, 2016
· 9,076 Views · 1 Like
article thumbnail
Scaling and Sizing with PDFJam
I find myself needing to take a PDF, output it at a specific size, and have the result offset to the top right hand side of the screen. To achieve it, I needed a few new switches to my good friend PDFJam, so I thought I'd share my command! pdfjam --suffix converted --papersize '{1920px,1080px}' --scale 0.4 --trim "-6cm -1cm 13cm 8cm" slides.pdf The --suffix is instead of giving an output filename, whatever you feed in ends up with the suffix in its filename. This is very handy because I use this command in a script and only need to pass in one variable. The --papersize isn't a switch I have used before either but you can set exact sizes for the final output which is nice. The --trim switch can also be used to set --clip=true to remove the trimmed space from the document if desired. I find PDFJam a very handy tool but with not nearly enough blog posts and code snippets around, so I'm dropping my command for future reference (yours as well as mine!).
May 19, 2015
· 5,843 Views · 0 Likes
article thumbnail
Install CharlesProxy CA Certificate on Android
I use Charles Proxy extensively for debugging all kinds of applications, and lately I've been using it more with mobile devices. One of the killer features of Charles is its ability to intercept SSL traffic. This is hard - and rightly so, it should be difficult to inspect SSL traffic! Charles handles this by using the server's SSL certificate for the connection from Charles to the remote server, and then using Charles' own SSL certificate for the "last mile" back to your browser or device. This means that the connection will be flagged as insecure; Charles' certificates aren't trusted by your browser or device - but we can easily change that. Get Charles' Certificate On Windows, you can grab the certificate from the Help menu in Charles, but for OS X or Linux you'll need to download it from their website. It's linked from this excellent documentation page about SSL:http://www.charlesproxy.com/documentation/using-charles/ssl-certificates/. Install it On Your Android Device Copy the ``.crt`` file into the root of your SD card (I found this didn't work in a subdirectory, although some documentation suggests it will). Under "Security" -> "Settings", choose "install from device storage" and it should pick up the certificate you put on the SD card. ... that's it :) Check you have enabled the destination for SSL proxying under "Proxy Settings" in Charles, and you're all set! Note, I have one device that refused to see the .crt file on the SD card, but when I emailed it to myself and then saved it from there, was added successfully. Thought I'd mention it! Further Reading Using Charles To Debug PHP SOAP Wireshark Capture on Remote Server View Only Headers with Curl
September 30, 2014
· 20,074 Views · 0 Likes
article thumbnail
Using Composer in an Existing Project
I've got an application (OK, scratty PHP script) that glues together some API things and shows them onto a dashboard for me. Recently, I updated it to use Guzzle as the consuming client, since Twitter now needs me to authenticate (I wrote about that if you're interested), and I used Composer to bring the new library in. It was very simple, so I thought I'd share it since it's quite a minimal example, and those are my favorite kind. Getting Started with Composer First of all, you'll need to either install composer, or at least get the .phar -- these examples use the composer.phar file from under the "Manual Download" section. Composer comes with instructions, for a list of command types: php composer.phar list Once you've got Composer ready to go, we can move on and configure it. State Your Dependencies All you need to do to use Composer is to create its configuration file and then tell it to do its magic. :) All I want here is the Guzzle library, so my config file is rather simple: { "require": { "guzzle/guzzle": "3.7" } } Get the Libraries From this point, Composer can do the rest by itself. It will fetch all the libraries you set in the config file, but will also get any dependencies of those libraries. To ask it to do this, just type: php composer.phar install This will download all the libraries you need and place them in a vendor directory. In the case of Guzzle, it depends on other libraries (from the Symfony project), so my vendor directory now contains: . ├── autoload.php ├── composer ├── guzzle └── symfony And there you have it: all the libraries you need are in place. Tell Your Application About Its Dependencies One more step: just add the following line into your application to make those new libraries available to it. require 'vendor/autoload.php'; There you go. :) Enjoy using Composer even in existing/legacy applications, projects that aren't built in "the one true way" or really anywhere else you don't want to have to include libraries in your repositories. Oh, and one more tip if you're just getting started: Add the vendor folder to your source control "ignore" file. Further Reading Nice post from Cal about including non-composer libs in your autoloader: http://blog.calevans.com/2013/07/21/using-3rd-party-libraries-in-composer-projects/ Composer documentation: http:// http://getcomposer.org/doc/ Further Reading Upgrading PHP Tools for Better PHP Twitter Search API Using PHP and Guzzle PSR-What?
January 2, 2014
· 10,147 Views · 2 Likes
article thumbnail
Setting Multiple Headers in a PHP Stream Context
Last week I tried to create a PHP stream context which set multiple headers; an Authorization header and a Content-Type header. All the examples I could find showed headers built up as a string with newlines added manually, which seemed pretty clunky and not-streams-like to me. In fact, you've been able to pass this as an array since PHP 5.2.10, so to set multiple headers in the stream context, I just used this: [ "method" => "POST", "header" => ["Authorization: token " . $access_token, "Content-Type: application/json"], "content" => $data ]]; $context = stream_context_create($options); The $access_token had been set elsewhere (in fact I usually put credentials in a separate file and exclude it from source control in an effort not to spread my access credentials further than I mean to!), and $data is already encoded as JSON. For completeness, you can make the POST request like this:
May 8, 2013
· 11,765 Views · 0 Likes
article thumbnail
Pretty-Printing JSON with Python's JSON Tool
today's quick tip is something that was widely retweeted after my "debugging http" talk at the ever-fabulous whiskyweb conference last weekend. when working with json on the commandline, here's a quick tip for showing the json in a nicer format: curl http://api.joind.in | python -mjson.tool you need python installed, but the json extension is probably included, and that's all you need for this tool. the result is something like: you can also use this approach to present json data that has been captured to another file, for example, it's a handy trick that i use often when developing something with json as a data format.
April 16, 2013
· 17,646 Views · 0 Likes

Refcards

Refcard #245

Getting Started With Redis

Getting Started With Redis

Refcard #185

Subversion

Subversion

Trend Reports

Trend Report

API Management

DZone Trend Reports zoom in on the content from our Research Guides that readers have found most useful. The API Management Trend Report features in-depth original research on developer preferences surrounding API programs and integrated systems. Experts in the field also share their perspectives on the importance of developer experience to API strategy, the business value of various API types, and the challenges of API-driven digital transformation.

API Management

User has been successfully modified

Failed to modify user

ABOUT US

  • About DZone
  • Send feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: