Skip to content

Instantly share code, notes, and snippets.

View rawsyntax's full-sized avatar

Eric Himmelreich rawsyntax

View GitHub Profile
@magnars
magnars / gist:2350388
Created April 10, 2012 10:50
Push mark when using ido-imenu
;; Push mark when using ido-imenu
(defvar push-mark-before-goto-char nil)
(defadvice goto-char (before push-mark-first activate)
(when push-mark-before-goto-char
(push-mark)))
(defun ido-imenu-push-mark ()
(interactive)
@magnars
magnars / gist:2360578
Created April 11, 2012 17:05
ido-imenu as used in Emacs Rocks #10
(defun ido-imenu ()
"Update the imenu index and then use ido to select a symbol to navigate to.
Symbols matching the text at point are put first in the completion list."
(interactive)
(imenu--make-index-alist)
(let ((name-and-pos '())
(symbol-names '()))
(flet ((addsymbols (symbol-list)
(when (listp symbol-list)
(dolist (symbol symbol-list)
(defun use-theme (theme &optional no-confirm no-enable)
(interactive
(list
(intern (completing-read "Load custom theme: "
(mapcar 'symbol-name
(custom-available-themes))))
nil nil))
(progn
(dolist (curtheme (custom-available-themes))
(disable-theme curtheme))
@fallwith
fallwith / .agignore
Created June 21, 2013 18:30
The Silver Searcher ~/.agignore file
/log/
/logs/
/images/
/javascripts/
/stylesheets/
/tmp/
/vendor/
*.sql
*.tags*
*.gemtags*
@L422Y
L422Y / osx_automount_nfs.md
Last active May 10, 2024 09:06
Automounting NFS share in OS X into /Volumes

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#

+auto_master # Use directory service

@nquinlan
nquinlan / update_subuser_eventnotify_url.rb
Last active February 22, 2018 22:25
update subusers event notification url
# Runs through all of an Parent's subusers, and updates subusers Event Webhook to use a specified URL
# DOES NOT update Parent.
# Settings push call requires all settings to be defined. This script properly queries each account's settings, and sends them back, with the version updated only.
# Can easily be modified to set all subusers to particular settings.
#
# Requires:
# Credential for Parent account with API permission.
# Folder named 'logs' in same folder as script.
#
# v0.1, 13 Jun 2014, Nick @ SendGrid
@rubencaro
rubencaro / install_elixir.md
Last active September 30, 2023 03:58
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

@Geesu
Geesu / assets.rake
Created December 8, 2014 16:55
Disable asset precompilation on heroku
Rake::Task["assets:precompile"].clear
namespace :assets do
task 'precompile' do
puts "Not pre-compiling assets..."
end
end
@w3irdrobot
w3irdrobot / kinesis.py
Last active February 4, 2022 15:02
Reading Data From Kinesis
from datetime import datetime, timedelta
import json
import boto
def get_kinesis_data_iterator(stream_name, minutes_running):
# Connect to Kinesis
kinesis = boto.connect_kinesis()
# Get data about Kinesis stream for Tag Monitor
kinesis_stream = kinesis.describe_stream(stream_name)
@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active May 22, 2024 02:19
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl