Skip to content

Instantly share code, notes, and snippets.

View emcrisostomo's full-sized avatar
🎯
Focusing

Enrico Maria Crisostomo emcrisostomo

🎯
Focusing
View GitHub Profile
@emcrisostomo
emcrisostomo / gist:dc28855877f25e35a9a6162ae9cb4f2f
Created January 17, 2024 15:30
Publish Rancher Desktop docker daemon on tcp://0.0.0.0:2375
See: https://github.com/rancher-sandbox/rancher-desktop/discussions/2304
docker run -d --restart=always \
-p 0.0.0.0:2375:2375 \
-v /var/run/docker.sock:/var/run/docker.sock \
alpine/socat \
tcp-listen:2375,fork,reuseaddr unix-connect:/var/run/docker.sock
$ jwt-decode token ...
{
"alg": "RS256",
"typ": "JWT",
"kid": "sbS_BWBm0GzfIQRnYWolcWDRnjqwDTY_Aq6Fn_boqKM"
}
{
"jti": "271151a3-db11-4f37-a724-4cf9957774f4",
"exp": 1530979706,
"nbf": 0,
@emcrisostomo
emcrisostomo / emacs
Created December 8, 2017 19:51
ZSH - emacs() function
function emacs()
{
# -c creates a new frame
# -a= fires a new emacs server if none is running
emacsclient -c -a= $*
}
@emcrisostomo
emcrisostomo / org.gnu.emacs.daemon.plist
Created December 8, 2017 17:21
Emacs Daemon Launch Agent for macOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.gnu.emacs.daemon</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/emacs</string>
@emcrisostomo
emcrisostomo / settings.php
Created October 17, 2014 18:13
Drupal - Proxy Settings
/**
* External access proxy settings:
*
* If your site must access the Internet via a web proxy then you can enter
* the proxy settings here. Currently only basic authentication is supported
* by using the username and password variables. The proxy_user_agent variable
* can be set to NULL for proxies that require no User-Agent header or to a
* non-empty string for proxies that limit requests to a specific agent. The
* proxy_exceptions variable is an array of host names to be accessed directly,
* not via proxy.
@emcrisostomo
emcrisostomo / drupal.conf
Created October 17, 2014 18:01
Drupal Virtual Host
<VirtualHost *:80>
ServerName drupal.host.name
DocumentRoot /usr/local/www/drupal7
<Directory "/usr/local/www/drupal7">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
@emcrisostomo
emcrisostomo / log.env
Created October 17, 2014 17:50
apache-log-variables
export APACHE_LOG_DIR=/var/log/apache
@emcrisostomo
emcrisostomo / create-local-port-repository.sh
Last active August 29, 2015 14:05
Create Local MacPorts Port Repository
$ mkdir /ports # If it does not exist
$ mkdir /ports/sysutils # If it does not exist
$ mkdir /ports/sysutils/fswatch
$ mv /path/to/Portfile \ # Create or edit the Portfile
/ports/sysutils/fswatch
$ chown -R macports:macports /ports
$ cd /ports && portindex
@emcrisostomo
emcrisostomo / Portfile
Created August 19, 2014 17:30
GitHub Portfile Example
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
PortGroup github 1.0
github.setup emcrisostomo fswatch 1.3.9
github.tarball_from releases
categories sysutils
@emcrisostomo
emcrisostomo / Portfile
Created August 19, 2014 17:08
Basic MacPorts Portfile
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
name fswatch
version 1.3.9
categories sysutils
platforms darwin