Skip to content

Instantly share code, notes, and snippets.

View incandescentman's full-sized avatar

Jay Dixit incandescentman

View GitHub Profile
@1stvamp
1stvamp / mac-curl-ca-bundle.sh
Created March 22, 2012 12:50
Script to install cURL CA certificates on OS X without macports
#!/bin/bash
mkdir /tmp/curl-ca-bundle
cd /tmp/curl-ca-bundle
wget http://curl.haxx.se/download/curl-7.22.0.tar.bz2
tar xzf curl-7.22.0.tar.bz2
cd curl-7.22.0/lib/
./mk-ca-bundle.pl
if [ ! -d /usr/share/curl/ ]; then
sudo mkdir -p /usr/share/curl/
else
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active November 14, 2024 17:18
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@railwaycat
railwaycat / Emacs_starter.pl
Last active March 12, 2023 01:26
Start Emacs.app from CLI
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {

Note

This is my dot-file, therefore it’s prone to have broken-ness in it. I’m trying to clean it up and make sure it’s sane.

Things currently not the way i’d like

  • escreen is nice, but i have to init it each time and set it up to use it… i’d like a working revive+ config, but I haven’t gotten it working correctly yet. see my twittering section for an example of how i use excreen
@jsomers
jsomers / websters-chrome.md
Created November 10, 2014 14:20
Adding Webster's as a Chrome search engine

Instructions courtesy of @chancelionheart:

  1. Access the Settings menu by clicking the Options icon in the upper-right corner of the browser window. It is the icon with three horizontal lines stacked on top of each other. Click on “Settings” near the bottom of the Options menu.

  2. Under the “Search” heading in the Settings menu, click the "Manage search engines" button.

  3. At the bottom of the Search Engines window that comes up, enter the following: Name: Use whatever you like (I used "Webster's Revised 1913+1928 Dictionary") Keyword: Also whatever you like, I just use 'd' for easy access. Url: http://machaut.uchicago.edu/?resource=Webster%27s&word=%s&use1913=on&use1828=on (replaces the search term with %s, what google chrome uses for the query)

@simonmichael
simonmichael / init.el
Last active April 27, 2018 21:15
useful org-mode keybindings
; quick level-of-detail control for org (or orgstruct) mode
; M-N shows all nodes to depth N. M-0 shows all nodes and their content.
(eval-after-load "org" '(progn
(define-key org-mode-map "\M-1" (lambda () (interactive) (org-global-cycle 1)))
(define-key org-mode-map "\M-2" (lambda () (interactive) (org-global-cycle 2)))
(define-key org-mode-map "\M-3" (lambda () (interactive) (org-global-cycle 3)))
(define-key org-mode-map "\M-4" (lambda () (interactive) (org-global-cycle 4)))
(define-key org-mode-map "\M-5" (lambda () (interactive) (org-global-cycle 5)))
(define-key org-mode-map "\M-6" (lambda () (interactive) (org-global-cycle 6)))
(define-key org-mode-map "\M-7" (lambda () (interactive) (org-global-cycle 7)))
@alphapapa
alphapapa / outline-mode-folding-python-elisp-shell.el
Created March 22, 2015 08:23
Emacs: outline-mode folding for Python, elisp, and shell
(defun my/python-mode-outline-hook ()
(setq outline-level 'my/python-outline-level)
(setq outline-regexp
(rx (or
;; Commented outline heading
(group
(* space) ; 0 or more spaces
(one-or-more (syntax comment-start))
(one-or-more space)
(defun my/fix-space ()
"Delete all spaces and tabs around point, leaving one space except at the beginning of a line."
(interactive)
(just-one-space)
(when (looking-back "^[[:space:]]+") (delete-horizontal-space)))
(defun my/delete-backward ()
"When there is an active region, delete it and then fix up the whitespace."
(interactive)
(when (use-region-p)
; The workflow is really simple: Open the pdf file with emacs using
; pdf-tools (instructions on that are below). If you see something
; noteworthy, just call M-x org-store-link (I have this set to C-c l),
; then paste it into your "paper-notes.org" file using
; M-x org-insert-link (set to C-c C-l on my machine). The link created
; thusly will contain the pdf file as well as the page number, so when
; you later open your paper-notes.org file and do C-c C-o, the pdf file
; will open at the correct page.
; Installation instructions:
@bradleybossard
bradleybossard / titleUrlMarkdownClip.js
Created December 5, 2015 21:09
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;