This file contains 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 '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." | |
(interactive) | |
(if (use-region-p) | |
(kill-ring-save (region-beginning) (region-end) | |
(simpleclip-copy (region-beginning) (region-end)))))) |
This file contains 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
;; props to #emacs | |
(define-key global-map (kbd "C-x C-j") | |
(lambda (arg) | |
"RTM" | |
(interactive "P") | |
(kill-new (format "%s" (eval-last-sexp arg))))) |
This file contains 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
(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)) | |
)) |
This file contains 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
// 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"); | |
}); |
This file contains 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
'Refer to execShell() by Robert Knight | |
' Or, to the StackOverflow post by Robert Knight if it still exists: https://stackoverflow.com/questions/6136798/vba-shell-function-in-office-2011-for-mac | |
' OMFGBBQ IT WORKS! | |
rngSomeRange.copy | |
scriptToRun = "export LC_ALL=en_US.UTF-8 && " & _ | |
"touch " & sOutFolder & "/" & sOutFile & ".tex && " & _ | |
"pbpaste > " & sOutFolder & "/" & sOutFile & ".tex" |
This file contains 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
# 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: |
This file contains 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
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 | |
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' |
This file contains 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
# v. 1.0 | |
# Originally posted here: https://www.reddit.com/r/excel/comments/339gw7/discussion_simplest_possible_way_to_get_this/ | |
# 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: |
This file contains 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
#!/opt/local/bin/bash | |
# 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 |
This file contains 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
#!/opt/local/bin/bash | |
# WARNING -- AT ANY GIVEN TIME, THIS SCRIPT MAY NOT WORK DO TO CONSTANT UPDATES -- USE AT YOUR OWN PERIL! | |
## 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: |
OlderNewer