Skip to content

Instantly share code, notes, and snippets.

@ninrod
Last active January 18, 2017 12:16
Show Gist options
  • Save ninrod/b7cf0c0db0eeef884febd14f79b04c7d to your computer and use it in GitHub Desktop.
Save ninrod/b7cf0c0db0eeef884febd14f79b04c7d to your computer and use it in GitHub Desktop.
boostraping an emacs configuration from inside a corporate proxy through a mirror repo

Instructions for using emacs behind a draconian corporate firewall

  1. git clone spacemacs' elpa mirror or just put the repo inside an usb stick and place the repo in the ~/.emacs.d/mirror-elpa folder.
  2. place the provided init.el file in ~/.emacs.d.
  3. use the timeless and infinitely powerful editor at will. You now have unlimited access to all of melpa, elpa and orgmode without having to send/receive a single network packet.
  4. this also means that instead of taking minutes do download your 100+ packages, it now takes nanoseconds.

Redguardtoo's elpa-mirror

  • You can use the same setup to use @redguartoo's elpa-mirror.
  • The advantage is that you don't have to wait for d12frosted to update the spacemacs mirror.
  • The disadvantage is that you are confined to the packages that you use.
(require 'package)
(setq package-enable-at-startup nil)
(setq package-archives '(("melpa" . "~/.emacs.d/mirror-elpa/melpa/")
("org" . "~/.emacs.d/mirror-elpa/org/")
("gnu" . "~/.emacs.d/mirror-elpa/gnu/")))
(package-initialize)
;; Bootstrap John Wigley's `use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
; this will install latest version of org-mode even without an internet connection.
;; example use: fetch latest version of `org-mode'
(use-package org
:pin org ; here I'm using the archive in ~/.emacs.d/mirror-elpa/org/
:ensure org-plus-contrib
:defer 7)
; this will install evil mode even without an internet connection.
(use-package evil
:ensure t
:config
(evil-mode))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment