Add CSS and JavaScript Files to Phabricator Extensions

Every open source framework has its own methods of extending functionality; some make extending incredibly easy and others…not so much.  Most of the time it comes down to how well the framework is documented.  Phabricator did an awesome job of making necessary classes extendable but it’s fair to say it would be great if the framework had a bit […]
The post Add CSS and JavaScript Files to Phabricator Extensions appeared first on David Walsh Blog.

Link: https://davidwalsh.name/add-css-javascript-files-phabricator-extensions

Create Aliases in Bash

Every developer likes a shortcut — they’re what make us more efficient in our work.  Of course there are good shortcuts and bad shortcuts (lazy coding, lack of security review, etc.), but let’s stick with the positive and talk about a good shortcut:  bash aliases. We all have commands that we execute regularly but aren’t able to remember […]
The post Create Aliases in Bash appeared first on David Walsh Blog.

Link: https://davidwalsh.name/alias-bash

Create GitHub Pull Request and Issue Templates

There’s nothing more frustrating than getting an incomplete bug report.  I’ve often seen bug reports containing a useless “{x} feature doesn’t work”; no steps to reproduce, no URL, no browser or device information, just a hopelessly vague message.  Similar is receiving a pull request or patch which doesn’t state its intent and doesn’t provide steps to test […]
The post Create GitHub Pull Request and Issue Templates appeared first on David Walsh Blog.

Link: https://davidwalsh.name/github-templates

Track Empty Directories with git

There are times when you’d like to track an empty directory within git but there’s a problem: git wont allow you to add a directory that doesn’t have a file in it.  The easy solution is putting an empty stub file within the directory, and the industry standard for that stub file name is .gitkeep. You […]
The post Track Empty Directories with git appeared first on David Walsh Blog.

Link: https://davidwalsh.name/git-empty-directory

Get Keychain Passwords from Command Line

One of my favorite command line utilities is Guillermo Rauch’s wifi-password, a utility that allows you to get a saved password for the wifi network you’re presently connected to (to share with colleagues or creeper in the cafe you’re in).  The idea of being able to get a password from command line is super useful, especially […]
The post Get Keychain Passwords from Command Line appeared first on David Walsh Blog.

Link: https://davidwalsh.name/keychain-command-line

Get Python Requirements Package Hashes

Python’s (pip’s) requirements.txt file is the equivalent to package.json in the JavaScript / Node.js world.  This requirements.txt file isn’t as pretty as package.json but it not only defines a version but goes a step further, providing a sha hash to compare against to ensure package integrity: Flask==0.12.1 \ –hash=sha256:6c3130c8927109a08225993e4e503de4ac4f2678678ae211b33b519c622a7242 Jinja2==2.9.6 \ –hash=sha256:2231bace0dfd8d2bf1e5d7e41239c06c9e0ded46e70cc1094a0aa64b0afeb054 MarkupSafe==1.0 \ –hash=sha256:a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665 …. Coming from the JavaScript / package.json world, you […]
The post Get Python Requirements Package Hashes appeared first on David Walsh Blog.

Link: https://davidwalsh.name/hashin

Continue Download with cURL

One of the most useful but least talked about utilities a developer has at their disposal is cURL.  The cURL command line utility has been so amazing that Chrome lets you copy requests as cURL from the developer tools Requests panel.  cURL lets you post form data, follow redirects, get response headers, determine redirect URL, check gzip encoding, and much more. […]
The post Continue Download with cURL appeared first on David Walsh Blog.

Link: https://davidwalsh.name/continue-download-curl

Phabricator AphrontRequest / Save Error Fix

Working on Phabricator extensions has thrust me back into the world of PHP, a language I had only touched via WordPress plugins and blog themes over the past few years.  Despite being away from the language, I was able to jump back in fairly quickly and felt a small “back at home” comfort…until I realized Phabricator […]
The post Phabricator AphrontRequest / Save Error Fix appeared first on David Walsh Blog.

Link: https://davidwalsh.name/aphrontrequest-error

Fix Bash Error in Docker

I really enjoy working with Docker because it gives me more insight into creating and maintaining your own environments, mostly from scratch.  I instantly gained a greater appreciation for Ops engineers, package creators, and other engineers who work on low level software.  I think what I’m trying to say is that I’ve made a whole bunch of mistakes and completed […]
The post Fix Bash Error in Docker appeared first on David Walsh Blog.

Link: https://davidwalsh.name/docker-bash

Create Auth Tokens with PHP

Working with OAuth and similar authentication protocols requires the use of temporary tokens which represent unique handshakes between multiple web services.  These tokens must be unique, securely stored, and the longer, the better. Since I’ve been out of the PHP game for a while, I was researching how to create such tokens without additional libraries.  The following […]
The post Create Auth Tokens with PHP appeared first on David Walsh Blog.

Link: https://davidwalsh.name/random_bytes