Skip to content

Instantly share code, notes, and snippets.

View creativedrewy's full-sized avatar

Andrew Watson creativedrewy

View GitHub Profile
@rock3r
rock3r / giffify.py
Last active January 14, 2022 09:00
Giffify - easily create optimised GIFs from a video
#!/usr/bin/python
# License for any modification to the original (linked below):
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain
# this notice you can do whatever you want with this stuff. If we meet some day,
# and you think this stuff is worth it, you can buy us a beer in return.
import argparse, sys, subprocess, tempfile
@casualjim
casualjim / session_token_strategy.scala
Last active December 8, 2017 13:56
Session token strategy example for scalatra auth (scentry)
package org.example
package auth
import org.scalatra.auth.ScentryStrategy
import org.scalatra.{CookieSupport, ScalatraBase}
trait RedisClient {
def get(key: String): Option[String]
}
@dazfuller
dazfuller / Data.java
Created January 4, 2012 12:55
Method for transforming XML to XML using XSLT for Java/Android
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.StringReader;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;