Skip to content

Instantly share code, notes, and snippets.

View dtaniwaki's full-sized avatar

Daisuke Taniwaki dtaniwaki

View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@bengfarrell
bengfarrell / randomcoords.cpp
Last active May 5, 2025 13:09
Random Coordinates C++ Node.JS AddOn
#include <node.h>
#include <v8.h>
#include <stdio.h>
#include <stdlib.h>
using namespace v8;
Handle<Value> getRandomCoords2D(const Arguments& args) {
HandleScope scope;
@mnylen
mnylen / ScalatraFileUploadTests.scala
Created April 6, 2012 19:11
postMulti() helper for scalatra-test for making multipart/form-data requests. Useful when testing file uploads with scalatra-fileupload
import org.apache.commons.io.IOUtils
import org.eclipse.jetty.http.HttpHeaders
import org.eclipse.jetty.testing.HttpTester
import org.eclipse.jetty.io.ByteArrayBuffer
import util.DynamicVariable
import org.scalatra.test.ScalatraTests
import java.net.HttpCookie
import java.io.{ByteArrayOutputStream, FileInputStream, File}
trait ScalatraFileUploadTests extends ScalatraTests {