Skip to content

Instantly share code, notes, and snippets.

@meatballhat
meatballhat / run-travis-docker-image
Created February 23, 2015 15:37
Travis docker image usage
#!/usr/bin/env bash
set -o errexit
set -o xtrace
# Provide the "language" as $TRAVIS_LANGUAGE or first positional argument. Available languages
# at the time of this writing are:
#
# android
# erlang
@davidjrice
davidjrice / .travis.yml
Last active October 23, 2019 16:17 — forked from johanneswuerbach/.travis.yml
Travis CI + TestFlight integration (updated for Travis' new Mac VM setup / xctool)
language: objective-c
xcode_workspace: "<WorkspaceName.xcworkspace>"
xcode_scheme: "<SchemaName>"
script: xctool -workspace <WorkspaceName.xcworkspace> -scheme <SchemeName> -configuration Release build archive
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active January 3, 2025 03:54
5 entertaining things you can find with the GitHub Search API
@ctrueden
ctrueden / ExporterWorkaround.java
Created June 18, 2013 13:43
A hack for calling the Bio-Formats Exporter programmatically.
import ij.IJ;
import ij.ImagePlus;
import ij.Macro;
import loci.plugins.LociExporter;
/**
* This demonstrates how to programmatically call the Bio-Formats Exporter
* plugin, working around ImageJ's limitation that macro-based executions must
* be run in a thread named with a "Run$_" prefix. There is likely a simpler way
* of doing it, but this solution works.
from omero.gateway import BlitzGateway
import omero
from omero.rtypes import rstring
from omero_model_ProjectI import ProjectI
from omero_model_DatasetI import DatasetI
from omero_model_ProjectDatasetLinkI import ProjectDatasetLinkI
from omero_model_ExperimenterI import ExperimenterI
from omero_model_ExperimenterGroupI import ExperimenterGroupI
from omero_model_PermissionsI import PermissionsI
from omero_model_TagAnnotationI import TagAnnotationI
@technoweenie
technoweenie / gist:5101109
Last active January 7, 2016 16:56
API Existential Crisis

API Existential Crisis

One bit of feedback we've heard from some heavy users of the API is that they want to access user and repository data by ID, and not name.

GET /users/technoweenie
GET /repos/technoweenie/faraday

If you're tracking user or repository data, using a URL with a unique and unchanging ID means the application won't break if the user or repository is

@chris-allan
chris-allan / lock_files_in_directory.py
Last active December 11, 2015 22:48
Attempts to perform an exclusive, non-blocking lock on an open file handle to each file in a directory.
#!/usr/bin/env python
import traceback
import fcntl
import sys
import os
try:
d, = sys.argv[1:]
except ValueError:
print 'Usage: %s <directory>' % sys.argv[0]
@owenthereal
owenthereal / tmux-iterm2.rb
Last active December 10, 2015 11:48
Homebrew custom build script for Tmux and Iterm2.
require 'formula'
class TmuxIterm2 < Formula
url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20121224.zip'
sha1 'a2ea1cb72f3cef193d929c1580ef82710bc7345b'
head 'git://tmux.git.sourceforge.net/gitroot/tmux/tmux'
depends_on 'pkg-config' => :build
depends_on 'libevent'
@jiffyclub
jiffyclub / game_of_life.ipynb
Created September 24, 2012 21:15
Conway's Game of Life in an IPython Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.