Skip to content

Instantly share code, notes, and snippets.

For hire

Chris paxperscientiam

For hire
Block or report user

Report or block paxperscientiam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
paxperscientiam / kill-ring-save-and-osx-clipboard.el
Last active Oct 22, 2015
Just a bit of emacs lisp that maps both `kill-ring-save' and `simpleclip-copy' to M-w
View kill-ring-save-and-osx-clipboard.el
(require 'simpleclip)
(simpleclip-mode 1)
(define-key global-map (kbd "M-w")
(defun kill-save-copy-to-clipboard ()
"The function kill-save-copy-to-clipboard uses `simpleclip-mode' to
kill-ring-save and copy to osx clipboard using a common shortcut."
(if (use-region-p)
(kill-ring-save (region-beginning) (region-end)
(simpleclip-copy (region-beginning) (region-end))))))
paxperscientiam / kill-expression-result.el
Last active Nov 11, 2015
Kill emacs list expression result.
View kill-expression-result.el
;; props to #emacs
(define-key global-map (kbd "C-x C-j")
(lambda (arg)
(interactive "P")
(kill-new (format "%s" (eval-last-sexp arg)))))
paxperscientiam / kill-and-copy-expression-result.el
Last active Oct 22, 2015
Kill and copy an expression result.
View kill-and-copy-expression-result.el
(define-key global-map (kbd "C-x C-j")
(defun kill-copy-eval-sexp (arg)
"The function `kill-copy-eval-sexp' kill-saves and copies an
expression result using `simpleclip-mode'."
(interactive "P")
(set-register ?1 (format "%s"(eval-last-sexp arg)))
(simpleclip-set-contents (get-register ?1))
(kill-new (get-register ?1))
paxperscientiam / gulp-conditional-depends.js
Created Oct 27, 2015
// Execute task dependencies conditionally!
View gulp-conditional-depends.js
// requires and what not
// Execute task dependencies conditionally!
var conditional = true;
var jk = (conditional) ? ['b']:null;
gulp.task('a', jk, function() {
"use strict";
console.log("THIS IS A");
paxperscientiam / EGUTF8.bas
Created Nov 5, 2015
Quite possibly the only way to export UTF8 formatted data from Excel 2011!
View EGUTF8.bas
'Refer to execShell() by Robert Knight
' Or, to the StackOverflow post by Robert Knight if it still exists:
scriptToRun = "export LC_ALL=en_US.UTF-8 && " & _
"touch " & sOutFolder & "/" & sOutFile & ".tex && " & _
"pbpaste > " & sOutFolder & "/" & sOutFile & ".tex"
paxperscientiam / CDPathExpand
Last active Mar 2, 2016
Demonstration of how braces expansion can be used to shorten $PATH string.
View CDPathExpand
# Version 1.0
# Pax Per Scientiam
# Bash "brace expansion" can be used to compactify long lists of paths.
# I've come up with some basic syntax rules to demonstrate this.
# For the simplest directory structure (i.e. /x00{,/x10{,/x20{,/x30}}}, the expansion result is...
# input>
CDPATH=`printf %s\\: /x00{,/x10{,/x20{,/x30}}}` && echo $CDPATH
# output> /x00:/x00/x10:/x00/x10/x20:/x00/x10/x20/x30:
paxperscientiam / UDF_NearestInteger.bas
Created Nov 5, 2015
An Excel VBA UDF to round a decimal number to the nearest integer.
View UDF_NearestInteger.bas
Function getRoundInteger(num As Double) As Double
Const BUG As Boolean = 1
Dim er As Integer: er = 0
' getRoundInteger( ) v.1.0
' Function getRoundInteger( ) takes a double and uses the "rounds half up" method (towards +∞) to get the nearest "integer".
' The error stuff was just an experiment that will get it's on follow up.
' Works pretty well, though use at your own discretion!
' ~ Pax Per Scientiam
paxperscientiam / ComputeRelativeRowsExcel.txt
Last active Nov 5, 2015
A review of various ways to determine relative row numbers in Excel
View ComputeRelativeRowsExcel.txt
# v. 1.0
# Originally posted here:
# Use at your own discretion.
# Pax Per Scientiam
This is pretty much ripped directly from a posting I made on Reddit. I'm putting it here for posterity. Please note that I'm using the Excel 2011 (Mac) version of structured reference syntax, which I think is a bit different than that of Excel 2013 (Windows).
I've long wondered if there were a simpler way to get the relative row number of an Excel Table.
This has been my usual go to (refers to some table called "Table1" and some column therein called "column1"),which is entered into column1:
paxperscientiam / macycle
Last active Jul 5, 2016
Simple script for MAC address spoofing for Bash on OSX
View macycle
# NEWS (4/7/16) Working.
# This is an active experiment; use at your own peril!
# Comments and criticism are most welcome!
# Motivation, to get devices without captive portal support online.
# environment stuff
unset CDPATH
paxperscientiam / runLBLL.engine
Last active Dec 24, 2015
TeXShop Engine for maintaining a sweet directory structure and LaTeX'ing and BibTeX'ing the correct number of times.
View runLBLL.engine
## Added stand-alone support; may be used from the command line and from any directory.
## Added support for multiple image types
## Streamlined code to ensure minimal file shuffling.
## Corrected problem of TeXShop not auto-opening final .pdf product.
# runLBLL.engine is an .engine file for TeXShop and should be stored in ~/Library/TeXShop/Engine -- be sure to restart TeXShop
# You could store your .bib and .bst files in the /Misc directory or use TeXLive's ~/Library/texmf/bibtex/bib and ~/Library/texmf/bibtex/bib/bst, respectively, for global access
# This script will LaTeX-->BibTeX-->LaTeX-->LaTeX
# Credit:
You can’t perform that action at this time.