Skip to content

Instantly share code, notes, and snippets.

@manu-mannattil
manu-mannattil / xoppwidth.py
Last active June 10, 2020 01:04
A script to set the stroke width in a Xournal++ document as a percentage of the current width
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# xoppwidth.py is a simple Python script to set the stroke width in
# a Xournal++ .xopp document as a percentage of the current stroke
# width. For instance, to double the stroke width, run
#
# xoppwidth.py -w 200 -o output.xopp input.xopp
#
# For a detailed description of the options, run
@manu-mannattil
manu-mannattil / chroma-build.sh
Created August 23, 2019 19:15
A shell script to build Chroma on USQCD clusters
#!/usr/bin/env bash
# vim: ft=sh fdm=marker et sts=4 sw=4
#
# chroma-build.sh -- a shell script to build Chroma on USQCD clusters
#
# This is a script to build Chroma on the FNAL-USQCD clusters.
# The FNAL-USQCD network has multiple clusters with different processors
# and architectures.
#
# Basic Usage
@manu-mannattil
manu-mannattil / ezproxy.js
Created July 5, 2019 17:21
Bookmarklet to visit the current webpage using SU's EZProxy
javascript:location.href=location.origin.replace(/\./g,'-')+'.libezproxy2.syr.edu'+location.pathname+location.search
@manu-mannattil
manu-mannattil / clean2scan.sh
Last active July 5, 2019 17:21
Make clean PDFs look like they were scanned
#!/bin/sh
#
# clean2scan.sh -- make clean PDFs look like they were scanned
#
# Usage: clean2scan.sh <file>
#
# This is a simple script that uses ImageMagick and Ghostscript to
# distort and transform pages in a PDF to mimick scanned PDFs.
#
# Requires: convert(1) and gs(1)
@manu-mannattil
manu-mannattil / sm-j327a_debloat.sh
Created January 24, 2019 04:45
Samsung SM-J327A debloat script
#!/bin/sh
#
# sm-j327a_debloat.sh -- debloat Samsung SM-J327A
#
# Usage: sm-j327a_debloat.sh
#
# This script will uninstall a bunch of bloatware from the Samsung
# SM-J327A (AT&T Galaxy Prime 2 SM-J327A) phone that cannot otherwise be
# uninstalled [1]. For this script to work, you will need to enable
# developer tools and USB debugging on your phone.