Skip to content

Instantly share code, notes, and snippets.

Working on @pixelfed

daniel dansup

Working on @pixelfed
View GitHub Profile
View Pixelfed Mac Dev

The easiest way to run Pixelfed for development on Mac is using Laravel's Valet. Valet contains a number of tools to run the application locally with minimal fuss.

You'll need to install Homebrew, a Mac package manager, to start off. Once you've installed Homebrew, if you haven't already installed PHP 7.3, install it with brew install php.

After installing PHP, you'll want to install Composer, which is a PHP dependency manager that can also install Valet for you. Then run composer global require laravel/valet, which will install Valet as a globally-available program. To access it, be sure to add ~/.composer/vendor/bin to your shell's PATH variable. Then run valet install to finish installing Valet's dependencies.

Running the valet park command inside a folder will allow you to access [subfolder].test as a local domain. You can set this up however you wish, though an

Bradcomp / toggle-menu.js
Created September 3, 2016 00:08
Toggles the .is-active class for a hamburger menu
View toggle-menu.js
(function() {
var burger = document.querySelector('.nav-toggle');
var menu = document.querySelector('.nav-menu');
burger.addEventListener('click', function() {
lukehedger / ffmpeg-compress-mp4
Last active June 6, 2023 07:10
Compress mp4 using FFMPEG
View ffmpeg-compress-mp4
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
thefinn93 / github.php
Created May 17, 2013 04:06
A php script to pull from git whenever it is called (from approved IPs). It's meant to be a github service hook.
View github.php
$github_ips = array("", "", "", "", "", "");
function cidr_match($ip, $cidr) {
list($subnet, $mask) = explode('/', $cidr);
if ((ip2long($ip) & ~((1 << (32 - $mask)) - 1) ) == ip2long($subnet))
return true;
philipn / gist:2907544
Created June 10, 2012 22:29
Cache cloudmade titles in localwiki
View gist:2907544
You'll want to replace '' with your hostname here.
Add to
'cachedcloudmade': """OpenLayers.Layer.CachedCloudMade('CachedCloudMade',