Skip to content

Instantly share code, notes, and snippets.

View diego898's full-sized avatar

Diego Mesa diego898

View GitHub Profile
@diego898
diego898 / movetochrome.scpt
Created September 4, 2015 17:51
AppleScript file to move tabs from safari to chrome
tell application "Safari"
if not (exists document 1) then return
set theURL to URL of current tab of window 1
close current tab of window 1
end tell
tell application "Google Chrome"
if not (exists window 1) then
reopen
else
@diego898
diego898 / .block
Last active March 5, 2016 03:15
Bubble Map
license: gpl-3.0
@diego898
diego898 / .block
Created March 5, 2016 03:29 — forked from mbostock/.block
U.S. Counties TopoJSON
license: gpl-3.0
@diego898
diego898 / trash
Created September 22, 2016 17:44
trash osx command line application from: https://github.com/morgant/tools-osx
#!/bin/bash
#
# trash - Move files to the appropriate .Trash file on Mac OS X. (Intended
# as an alternative to 'rm' which immediately deletes the file.)
#
# v0.1 2007-05-21 - Morgan Aldridge <morgant@makkintosshu.com>
# Initial version.
# v0.2 2010-10-26 - Morgan Aldridge
# Use appropriate .Trashes folder when trashing files
@diego898
diego898 / Preferences.sublime-settings
Last active October 10, 2016 16:10
My sublime settings file
{
"WrapPlus.break_on_hyphens": false,
"WrapPlus.break_on_long_words": false,
"added_words":
[
"discriminability",
"neuroscience",
"achievability",
"cyber",
"invertibility",
@diego898
diego898 / batchConvertSMA.m
Created October 22, 2016 18:16
Some files to batch convert snap-master generated SMA files, using a slightly customized version of EEGLAB's snapread() function.
% batchConvertSMA() - Convert all SMA files in current directory and
% sub-directories to CSV files. Additionally extract the
% header and save as a txt file.
function [data,params,head,events] = batchConvertSMA()
% Grab all SMA files in current directory and sub-directories
files = dir('**/*.SMA');
% count number of SMA files
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diego898
diego898 / .macos
Last active January 11, 2021 20:05
Changes to macos defaults:
# Most of this was selectively copied/edited from: https://github.com/mathiasbynens/dotfiles/blob/master/.macos
# Disable the sound effects on boot
sudo nvram SystemAudioVolume=" "
# Expand save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Expand print panel by default
@diego898
diego898 / basic_statement.tex
Created March 19, 2017 17:53
A basic statement with custom title, header, footer and margins
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DOCUMENT TITLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PREAMBLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[11pt]{article}
\usepackage{amsmath,amssymb,mathrsfs,graphicx,overpic,color}
\usepackage{verbatim,stackrel,url,float,enumerate,cleveref}
@diego898
diego898 / highlight-todo.py
Last active March 22, 2017 18:23
A simple ST plugin to highlight text like `\todo`, `@todo`, `@author_name` - originally from - https://github.com/SublimeText/LaTeXTools/issues/1052#issuecomment-287898776
import sublime
import sublime_plugin
class HighlightTodoListener(sublime_plugin.EventListener):
def highlight_todo(self, view):
# only highlight tex files
if not view.score_selector(0, "text.tex"):
return
# adapt this regex as you wish