Skip to content

Instantly share code, notes, and snippets.

@edalquist
edalquist / full-ffmpeg.sh
Last active July 27, 2016 21:06
Install on ReadyNAS OS6
# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
@SpotlightKid
SpotlightKid / MarkdownPDF.py
Last active August 25, 2023 20:55
Markdown to PDF Conversion for Pythonista
# Markdown to PDF Conversion
#
# This script converts Markdown markup to PDF directly on your iOS device.
#
# Please see the "Requirements" section in the docstring below for required
# dependencies and the "Installation" section for instructions on how to
# install them.
#
# Run this script directly or put it into the Pythonista editor action menu
# with one of the following options as the first and sole argument:
@happyrainb
happyrainb / Summon1-use360API.js
Last active December 23, 2016 18:11
Summon1-use360API.js: The orginal script is called Summon-clicks.js which is made by Matthew Reidsma & Adam Luckenbaugh. You need to save this javascript on you web server and put the ULR to: ProQuest’s Client Center>Summon Admin>Custom Link> URL. You will need another file (apiArticle.php) to be stored in the same directory on your web server.
/*
* Script to log summon usage statistics & customize Summon UI
* http://gvsu.summon.serialssolutions.com/search?s.cmd=nextPage%28%29&s.light=t&s.pn=4&s.q=test
* Authors: Matthew Reidsma & Adam Luckenbaugh
* Version 1.2
* Last Edited by: Jenny Jing & Sharifi Ahmed, 05/24/2015
* Function: find the ISSN and DOI in each record displayed in Summon result page, and use them as the input for 360Link API, in order to generate the links in the mini-popup window.
*/
$(document).ready(function() {
@jmshal
jmshal / bugsnag.js
Created June 18, 2014 08:57
Bugsnag & Browserify
//
// **Bugsnag.js** is the official JavaScript notifier for
// [Bugsnag](https://bugsnag.com).
//
// Bugsnag gives you instant notification of errors and
// exceptions in your website's JavaScript code.
//
// Bugsnag.js is incredibly small, and has no external dependencies (not even
// jQuery!) so you can safely use it on any website.
//
@omz
omz / Dropbox File Picker.py
Last active February 20, 2025 09:40
Dropbox File Picker.py
# IMPORTANT SETUP INSTRUCTIONS:
#
# 1. Go to http://www.dropbox.com/developers/apps (log in if necessary)
# 2. Select "Create App"
# 3. Select the following settings:
# * "Dropbox API app"
# * "Files and datastores"
# * "(No) My app needs access to files already on Dropbox"
# * "All file types"
# * (Choose any app name)
@dz
dz / 1. How to Use.md
Last active April 2, 2020 18:06
Slack Fluidapp Customizations

DZSlack

What is this?

The following files add some view keybindings and other functional and styling changes to Slack when used inside of a Fluid app.

Specifically:

  1. <cmd>-number will bring you to the respective starred channel. For example, if you have 4 starred channels, <cmd-1> will bring you to the first starred channel, <cmd-2> to the second, etc.
@lanrat
lanrat / crop.sh
Created April 17, 2014 02:31
script to crop PDFs with briss
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BRISS="${DIR}/briss-0.9-sakin-1/briss-0.9.jar"
JPATH="$(which java)"
#get list of all non-cropped PDFs
pdfs="$(find ${DIR} -type f -name "*.pdf" | grep -v "cropped")"
#number of documents cropped
count=0
@anotheruiguy
anotheruiguy / node-and-express.md
Last active June 24, 2020 17:09
Set up a new Node.js project with Express >4.0: a newb's guide

And my article is deprecated!

As of just writing this, Express 4.0 was released and there are points in there that no longer matter. So, this remains as a great >4.0 article.

Node.js is the red-hot new hotness! You can't throw a stick on the internet without hitting someone talking about Node. But why? For one, it's built on JavaScript which is completely ubiquitous. So, why not build a development stack and server on JavaScript? I would argue that the installation is almost painless while the terseness of the language is not.

While you can create apps 100% from Node.js, the Express framework is a great tool that helps you solve many standard problems without having to write boilerplate code.

Node.js is here and it's not going anywhere anytime soon. So if you are new to Node.js, Express, and even JavaScript in general, this is a great newb's step-by-step guide to get started.

@TravelingTechGuy
TravelingTechGuy / ChromeExtensionGulp.js
Created April 5, 2014 19:22
Gulp file for building a Chrome Extension
'use strict';
//npm install gulp gulp-minify-css gulp-uglify gulp-clean gulp-cleanhtml gulp-jshint gulp-strip-debug gulp-zip --save-dev
var gulp = require('gulp'),
clean = require('gulp-clean'),
cleanhtml = require('gulp-cleanhtml'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
stripdebug = require('gulp-strip-debug'),