This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ~/Library/Preferences/Aquamacs Emacs/Preferences.el | |
;; This is the Aquamacs Preferences file. | |
;; Add Emacs-Lisp code here that should be executed whenever | |
;; you start Aquamacs Emacs. If errors occur, Aquamacs will stop | |
;; evaluating this file and print errors in the *Messags* buffer. | |
;; Use this file in place of ~/.emacs (which is loaded as well.) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((web-mode . ((web-mode-code-indent-offset . 2) | |
(web-mode-css-indent-offset . 2) | |
(web-mode-markup-indent-offset . 2)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require 'test/unit' | |
class BespokeFlattenTest < Test::Unit::TestCase | |
def bespoke_flatten(arr, accum = []) | |
return arr unless arr.is_a?(Array) | |
until arr.empty? | |
elem = arr.shift | |
elem.is_a?(Array) ? bespoke_flatten(elem, accum) : (accum << elem) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use v5.18; | |
my $MAX_TABS = 22; | |
while (<STDIN>) { | |
chomp $_; | |
my $c = ($_ =~ tr/\t//); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .git_hooks/pre_push/git_lfs.rb | |
# Be sure to enable this hook in .overcommit.yml like this: | |
# | |
# PrePush: | |
# GitLfs: | |
# enabled: true | |
module Overcommit::Hook::PrePush | |
class GitLfs < Base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; package -- Summary: | |
;;; Commentary: | |
;;; Hooks for web mode | |
;;; Code: | |
(require 'web-mode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
alias ll='ls -al' | |
alias gimmeawindow="xterm -b 4 -sb -sl 5000 -geometry 110x60 -vb -fg yellow -bg black -fa \'Consolas\' -fs 16 &" | |
alias strace='dtruss' | |
alias start_postgres='pg_ctl -D /usr/local/var/postgres -l /var/log/postgres.log start' | |
alias stop_postgres='pg_ctl -D /usr/local/var/postgres stop -m fast' | |
alias ssh_to_master_db='ssh -o TCPKeepAlive=yes -o ServerAliveInterval=300 -L 5452:localhost:5432 root@master-db -p 22' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# make less more friendly for non-text input files, see lesspipe(1) | |
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | |
# set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo cpan Regexp::Debugger | |
vi /tmp/t.pl | |
`'abc' =~ /abx|c/` | |
perl -MRegexp::Debugger /tmp/t.pl | |
or | |
rxrx /tmp/t.pl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'tls) | |
(push "/usr/local/etc/libressl/cert.pem" gnutls-trustfiles) | |
;; ____________________________________________________________________________ | |
;; Aquamacs custom-file warning: | |
;; Warning: After loading this .emacs file, Aquamacs will also load | |
;; customizations from `custom-file' (customizations.el). Any settings there | |
;; will override those made here. | |
;; Consider moving your startup settings to the Preferences.el file, which | |
;; is loaded after `custom-file': |
NewerOlder