Skip to content

Instantly share code, notes, and snippets.

View jmibanez's full-sized avatar

JM Ibañez jmibanez

View GitHub Profile
;; emacs-mac only; see next for emacs-plus config
;; (mac-auto-operator-composition-mode) ;; Needed for ligatures in Fira Code
;; ligature.el isn't in MELPA yet, so pull it in from our local elisp load path
(use-package ligature
:config
(ligature-set-ligatures 't '("www"))
;; Enable ligatures in programming modes
(ligature-set-ligatures 'prog-mode '("www" "**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "::"
--- cert.pem.bak 2020-05-31 01:00:24.000000000 +1000
+++ cert.pem 2020-05-31 01:01:11.000000000 +1000
@@ -348,58 +348,6 @@
LnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
-----END CERTIFICATE-----
-### AddTrust AB
-
-=== /C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root
-Certificate:
(setq user-mail-address "jm@jmibanez.com"
user-full-name "JM Ibañez"
gnus-default-charset 'utf-8
mail-user-agent 'gnus-user-agent)
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
(defun jmi/gnus-mailto-list-to-regex (my-addresses)
(mapconcat (lambda (addr)
@jmibanez
jmibanez / rack-dns-auth.sh
Last active May 26, 2018 11:55
Certbot Manual Auth Hook script for Rackspace Cloud DNS
#!/bin/bash
# Manual auth hook script glue for Rackspace DNS
# This depends on rackdns CLI, see
# - https://github.com/morganfainberg/rackspace-dns-cli
# - https://github.com/kwminnick/rackspace-dns-cli
# CERTBOT_DOMAIN
# CERTBOT_VALIDATION (DNS)
export OS_USERNAME= # Rackspace user

Redmine Ticket Counts

This widget (and job) pulls ticket counts per priority from Redmine for a list of projects

Installation

Add faraday to your Gemfile:

var o = { "foo" : 1, "bar" : 2, "baz" : 3 };
for (k in o) {
console.log(k, o[k]);
}
@jmibanez
jmibanez / gist:3576746
Created September 1, 2012 15:16
Stringify edge case
var a = {
'key' : 'value',
'foo' : 'bar'
};
var b = {
'foo' : 'bar',
'key' : 'value'
};
@jmibanez
jmibanez / gist:2140974
Created March 20, 2012 20:29
Using restify with connect
// Restify server config here
var server = restify.createServer({
name: 'restify-test',
version: '1.0.0',
});
// ...
// Connect config here
var connectApp = connect()
@jmibanez
jmibanez / gist:1182616
Created August 31, 2011 01:38
.bashrc alias for changing into project directory (includes TAB completion)
function _project_list ()
{
local cur prev
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
PROJECTS=$(ls -d ~/projects/*/ ~/projects/*/*/ | xargs basename)
COMPREPLY=( $(compgen -W "$PROJECTS" -- ${cur}) )
return 0