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 / logstash
Created June 19, 2014 22:32
rc.d script for Logstash v. >= 1.4
#!/bin/sh
# Configuration settings for Logstash in /etc/rc.conf:
#
# logstash14_enable (bool):
# Default value: "NO"
# Flag that determines whether Logstash is enabled.
#
# logstash14_home (string):
# Default value: "/opt/logstash-1.4.1"
@emcrisostomo
emcrisostomo / render-flags.sh
Last active August 29, 2015 14:05
Resize the Flags Archive to the Desired Resolution
#!/bin/sh
# This script resizes all SVG files svg/*.svg to PNG files with the desired
# width. This script assumes that the following source and output directories
# already exist:
# * svg/
# * png/w
# for each target width w.
# Loop on the list of desired widths.
@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
@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 / 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 / log.env
Created October 17, 2014 17:50
apache-log-variables
export APACHE_LOG_DIR=/var/log/apache
@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 / 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 / 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 / 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= $*
}