Skip to content

Instantly share code, notes, and snippets.

Lars Vilhuber larsvilhuber

Block or report user

Report or block larsvilhuber

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
larsvilhuber /
Last active Sep 10, 2018
Setup file for Stata
/* */
/* Suggested by Lars Vilhuber */
/* Create a reproducible Stata sequence by running this file as the first part of the program sequence */
/* Get it at */
/* install any packages locally */
// Make a path local to the project
// Also see my related at
local pwd "/c/path/to/project"
capture mkdir `pwd'/ado
larsvilhuber /
Created Apr 17, 2018
Shell script to start CED2AR desktop app
# now open a browser, after letting Tomcat spin up
echo "
============ CED2AR ===============
To exit CED2AR, hit CTRL-C in the Terminal.
Waiting 10s for Tomcat to start"
larsvilhuber /
Created Mar 26, 2018 — forked from robwierzbowski/
A simple litte script. Create and push to a new github repo from the command line.
# Create and push to a new github repo from the command line.
# Grabs sensible defaults from the containing folder and `.gitconfig`.
# Refinements welcome.
# Gather constant vars
GITHUBUSER=$(git config github.user)
larsvilhuber /
Last active Feb 26, 2018
Script to convert CSV to OJS metadata format (approximately Bepress import from non-standard metadata)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
Created on Sun Dec 17 11:40:28 2017
@author: vilhuber
# Replaced by
larsvilhuber / etoggle.tex
Created Dec 15, 2017
Use of toggle in latex
View etoggle.tex
larsvilhuber /
Last active May 28, 2019
Add a Data Toggle Tile to Samsung devices without root
# Based on
# This will work with minor adjustments to your installation of the Android SDK or wherever you put adb.
# Should work on Linux and Mac, but only tested on Linux
outfile=list.$(date +%F)
adb devices
echo "Do you see your device? [y|N]"
larsvilhuber / gist:77eba9016504bedbede51dd6683aa573
Created Oct 26, 2017
OJS3 import with href submission file
View gist:77eba9016504bedbede51dd6683aa573
<?xml version="1.0"?>
<issue xmlns="" xmlns:xsi="" published="1" current="1" access_status="1" xsi:schemaLocation=" native.xsd">
<id type="internal" advice="ignore">1</id>
<title locale="en_US">Old Issue</title>
larsvilhuber / jupyter.qsub
Created Nov 11, 2016
Qsub file to run a jupyter notebook instance
View jupyter.qsub
#!/bin/bash -l
#PBS -l walltime=01:00:00
#PBS -l ncpus=1
#PBS -N jupyter
source /etc/profile.d/
module load python/anaconda
jupyter notebook
larsvilhuber /
Created Sep 30, 2016
Mirroring of Stata packages from Repec
if [[ -z $1 ]]
cat << EOF
$0 start
mirror $SRCURL to this directory
larsvilhuber / SR-test.tex
Created Sep 6, 2016
Code that seems to flumox StatRep package.
View SR-test.tex
%macro main;
data one;
do j=1 to 10;
%do i = 1 %to 70;
var&i. = &i.;
You can’t perform that action at this time.