Updating a Raspberry Pi hostname
Changing the hostname the usual way with hostnamectl kept reverting after every reboot, until some digging turned up what was silently overriding it.
Changing the hostname the usual way with hostnamectl kept reverting after every reboot, until some digging turned up what was silently overriding it.
Resolve MCP server tokens from 1Password at launch so Claude Code gets its credentials without a single secret ever landing in a committed config file.
Three about:config settings that fix where Firefox drops new tabs, especially when pinned tabs are involved.
Skip the public RustDesk server entirely and connect straight to your machines over their Tailscale IP addresses.
Not all hosting providers offer a mechanism to trigger follow up actions after a deployment. Here are a few examples using GitHub Actions to achieve it.
If you’re using electron-builder to publish your applications, then electron-auto-update provides you with a user-friendly simple auto update mechanism with one method call.
Use Keybase to setup and manage GPG, and start signing your git commits
A week long trip out in Spain with the need for CPU power back home
With only a handful of commands, tmux can still be your new best friend on the terminal
Get those code snippets embedded easily
Automated and repeatable WordPress deploys with Composer
The new, cool provisioning kid on the block
Get around those evil firewalls and secure your net connection
Leave behind the millions of plugins, and slowness, and just use Fish
Maybe don’t waste your time reporting it in future…
One server to rule them all
Be a ninja with EC2 using the CLI
It’s not as difficult as it may first seem
Keeping the core separate, but easy to update
Puppet can change your life
Using the Behat WebDriver driver to easily test websites with Javascript
Writing custom definitions
Some quick setup instructions on getting rbenv installed on Lion
A quick introduction on setting up Behat and writing your first test
Getting started with a Jekyll powered site and migrating from WordPress
When you sit down and start work on a new project, what hoops do you have to jump through before you get your app running in your browser? There are more than likely always going to be two; creating a spoof domain that you create in /etc/hosts so that …
I just setup a new Linode to host my new twitter app, lists dj and wanted to lock it down to basically Apache and SSH. iptables gives me a headache, and I don’t want to spend a day learning how to use it. APF uses iptables, but the configuration …
Not much more than a few hours have passed since I posted my APF setup howto , but I’ve found something even simpler. ufw - uncomplicated firewall. It does exactly as it says on the tin. sudo aptitude install ufw sudo ufw allow 22 sudo ufw enable That’s ssh sorted …
Having a reliable and easy to use developer environment on my Mac is essential for my work, and the odd project I work on. I original used the Entropy PHP packages as they were so easy to install, and just worked . Unfortunately, Marc Liyanage had stopped updating the packages with …
mkvmerge -o merged_file.mkv file1.mkv + file2.mkv
Rewrite rules in an htaccess file don’t need to leading slash, otherwise they won’t work. Be warned. Don’t waste two hours wondering why it isn’t working.
I’ve started using CodeIgniter again recently, and have noticed that my how-to on implementing basic authentication could do with an upgrade for version 2.0. The process is identical. We subclass the base CI_Controller class. This simply checks whether a logged in session is present. If not, it redirects …
Sorry, I promised a blog post, but instead you get a link to bitbucket with the source of a basic chat app written using WebSockets. https://bitbucket.org/davidwinter/websockets-chat/src
Here’s an example setup to create SSH host shortnames. On you local computer, add the following to ~/.ssh/config : Host server1 HostName server1.internet.com User david Host server2 HostName server2.internet.com User david Host * User davidwinter Now with this file saved, you can ssh into server2.internet …
Fed up with having to type your password in each time you log into a server over SSH? Me too. Down with passwords, and in with public key authentication! First thing to do, is to check that you have a SSH key setup already on your local computer: cd ~/.ssh …
We have a few production servers at work, and we have a central bitbucket repository to store our core code. Once we make a change on our testing server (!), we used to have to commit, push changes to bitbucket, and then ssh into each server, then pull changes, and update …
Our internet connection via our landline has been dead since Tuesday afternoon, so I’ve needed an alternative connection in the meantime to give me my twitter fix! I’d kept an eye on the o2 pay-as-you-go mobile broadband for a while, because it offered the cheapest, noncommittal setup. A …
Here’s a simple solution to redirect users to a maintenance page in Apache. This rewrite rule can stay in your config ( <VirtualHost> or .htaccess ) all the time; all that you need to enable it is to create the file maintenance.html . The first rewrite condition checks to see if …
We’ve finally moved to Mercurial at work (well, we didn’t exactly move from anywhere, but that’s another story…). Our production server is running CentOS 4, which comes installed with Python 2.3.4. Mercurial requires 2.4. No Python updates available in the yum repository. What to …
MongoDB (from “humongous”) is a scalable, high-performance, open source, schema-free, document-oriented database. There’s a lot of buzz brewing about it, so I wanted to give it a try with PHP on my development Mac. The following is how I went about installing Apache, PHP and MongoDB on Snow Leopard …
sudo update-rc.d -f script_name remove
Ensure that the mercurial convert extension is enabled: nano ~/.hgrc Inside that file add: [extensions] hgext.convert = Save. Now do: hg convert my-git-repo This will create a new directory called my-git-repo-hg . This will appear empty at first, so do this: cd my-git-repo-hg hg checkout All of your files will appear …
In php.ini: display_errors = Off log_errors = On error_log = / var / log / php - errors . log Make the log file, and writable by www-data: sudo touch / var / log / php - errors . log sudo chown www - data : www - data / var / log / php - errors . log
I’ve now changed my slice from running lighttpd to nginx. Here’s the simplest way, in around 6 commands, to get PHP up and running via FastCGI. Install and setup Install PHP 5: sudo aptitude install php5-cgi Install nginx: sudo aptitude install nginx Create PHP 5 FastCGI start-up script …
Here’s how I do some basic authentication for a controller in CodeIgniter . It basically consists of creating a new class that extends the default Controller class. You then sub-class this on any controller that requires authentication. Create your authentication controller in system/application/libraries and call it MY_Controller.php …
<?php $username = 'your_username' ; $password = 'your_password' ; $url = "https:// $username : $password @api.del.icio.us/v1/posts/recent" ; $request = new HttpRequest ( $url , HTTP_METH_GET ); $response = $request -> send (); print $response -> getBody (); ?> You’ll probably need to view the source in your browser to see the output. The second argument isn’t required in this …
You will probably want to ensure that curl supports https before getting underway: curl -V Check that the output contains https : >: curl -V curl 7.19.2 (i386-apple-darwin9.5.0) libcurl/7.19.2 OpenSSL/0.9.8i zlib/1.2.3 Protocols: tftp ftp telnet dict http file https …
It’s a little tricky getting a nice clean install of PHP5 for OS X 10.5. The packages that I always used to depend on over at Entropy don’t seem to work anymore. At least not for Leopard. A great shame. I’m now switching to lighttpd for …
Here’s a quick run down on getting lighttpd and php running on CentOS 5 . yum install lighttpd lighttpd - fastcgi php mkdir / var / run / lighttpd touch / var / run / lighttpd / php - fastcgi . socket chown - R lighttpd : lighttpd / var / run / lighttpd / vim / etc / php . ini Add in php.ini the following; cgi …
I just found out that HFS+, the preferred file system for Mac OS X, is case-insensitive when it comes to files and directories. I don’t understand why? It’s sure as hell causing issues with stuff I’m copying from my Ubuntu PC. Just seems like a dumb idea …