Skip to content

Instantly share code, notes, and snippets.

View diego898's full-sized avatar

Diego Mesa diego898

View GitHub Profile
@diego898
diego898 / beamer_presentation.tex
Last active April 24, 2018 19:47
A sample beamer presentation using the metropolis theme. These slides where generated white watching Michelle Krummel`s excellent youtube tutorial: 'https://www.youtube.com/watch?v=0fsWGg81RwU Also see: http://www.cpt.univ-mrs.fr/~masson/latex/Beamer-appearance-cheat-sheet.pdf There are also a bunch of random experiments from the tikz and beamer…
\documentclass[xcolor=dvipsnames]{beamer}
\usepackage{tikz,ifthen}
\usetikzlibrary{calc, intersections,through,backgrounds,positioning}
\usepackage{pgfpages}
\usepackage{blindtext}
\usepackage{multicol}
% \setbeameroption{show notes on second screen}
\usetheme[progressbar=frametitle]{metropolis}
\setbeamertemplate{frame numbering}[none]
\metroset{block=fill}
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Improve Findbar */
@keyframes scale-in {
0% {
transform: scaleY(0);
}
100% {
transform: scaleY(1);
}
@diego898
diego898 / README.md
Last active May 4, 2018 11:34
This is a set of files to watch a directory where I place PDFs of papers and automatically create a corresponding tiddler for that paper.

This is a set of files to watch a directory where I place PDFs of papers and automatically create a corresponding tiddler for that paper.

  • Edit TW_LOC, TID_DEF_TAGS, and TID_TEXT in the bash script
  • Edit location of bash script in .scpt file
  • place the .scpt file in ~/Library/Scripts/Folder Action Scripts/
  • make sure you have a default program to open the .tid extension (if you want to keep the open line)
  • this uses gdate from coreutils to get the timestamp right
  • right click on the folder you want to watch and add a new folder action, selecting the .scpt file
  • make sure the shell script is executable

Keybase proof

I hereby claim:

  • I am diego898 on github.
  • I am diego (https://keybase.io/diego) on keybase.
  • I have a public key whose fingerprint is 8B24 A08D 5F16 3CE8 A2FB 206F F46E 5894 3150 5FEF

To claim this, I am signing this object:

#!/usr/bin/env perl
# Finds duplicate adjacent words.
# run in a directory: perl dupe_words *.tex
# Note: it does not recursively check subdirectories
use strict ;
my $DupCount = 0 ;
\definecolor{myblue}{HTML}{4472C4}
\newcommand{\myp}{\textcolor{myblue}{p}}
\newcommand{\myP}{\textcolor{myblue}{P}}
\definecolor{mypurp}{HTML}{7030A0}
\newcommand{\mypt}{\textcolor{mypurp}{\tilde{p}}}
\newcommand{\myPT}{\textcolor{mypurp}{\tilde{P}}}
\definecolor{myorange}{HTML}{DF8344}
\newcommand{\myq}{\textcolor{myorange}{q}}
\definecolor{mybrown}{HTML}{843C0C}
\definecolor{mywhite}{HTML}{FFFFFF}
@diego898
diego898 / secn.sublime-snippet
Last active March 22, 2017 18:22
Some of my custom sublimetext latex snippets
<snippet>
<content><![CDATA[
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% $1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{${1:section name}}
\label{sec:${2:${1/\\\w+\{(.*?)\}|\\(.)|(\w+)|([^\w\\]+)/(?4:_:\L$1$2$3)/g}}}
${0:$TM_SELECTED_TEXT}
% END $2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@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
@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 / .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