This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# meme.sh | |
# https://gist.github.com/joshuaflanagan/77f31411d137aec9b9c1b79b42d339f8 | |
# Meme generator with ImageMagick | |
# https://www.it-cooking.com/technology/digital-image/image-processing/meme-generator-imagemagick/ | |
usage() { | |
echo "Usage: $0 [ -t TOP_MSG ] [ -b BOTTOM_MSG ] [ -s FONTSIZE=80] [ -a TOP_FONTSIZE=80 ] [ -z BOTTOM_FONTSIZE=80 ] SRC DST" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name | default_version | installed_version | comment | |
------------------------+-----------------+-------------------+--------------------------------------------------------------------- | |
pg_buffercache | 1.0 | | examine the shared buffer cache | |
earthdistance | 1.0 | | calculate great-circle distances on the surface of the Earth | |
pg_freespacemap | 1.0 | | examine the free space map (FSM) | |
intagg | 1.0 | | integer aggregator and enumerator (obsolete) | |
plperl | 1.0 | | PL/Perl procedural language | |
sslinfo | 1.0 | | information about SSL certificates | |
btree_gist | 1.0 | | support for indexing common datatypes in GiST | |
fuzzystrmatch | 1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SmartUrlHelper.configure do |url| | |
url.for ->model{ model.is_a?(Comment) } do |helpers, model| | |
helpers.post_comment_path(model.post, model) | |
end | |
# TODO: Add a convenience method for matching on type: | |
# url.for(Comment) do |helpers, model| | |
# helpers.post_comment_path(model.post, model) | |
# end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get-project -all | %{ $_.Properties | ?{ $_.Name -eq "WebApplication.StartWebServerOnDebug" } | %{ $_.Value = "False"} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SETLOCAL | |
SET VERSION=%1 | |
SET NUGET=buildsupport\nuget.exe | |
FOR %%G IN (packaging\nuget\*.nuspec) DO ( | |
%NUGET% pack %%G -Version %VERSION% -Symbols -o artifacts | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
SETLOCAL | |
REM This can be used for any .exe installed by a nuget package | |
REM Example usage: nuget_tool.bat nunit-console.exe myproject.tests.dll | |
SET TOOL=%1 | |
FOR /R %~dp0\source\packages %%G IN (%TOOL%) DO ( | |
IF EXIST %%G ( | |
SET TOOLPATH=%%G | |
GOTO FOUND | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ActiveRecord::Base | |
# Find a record by UUID primary key prefix | |
# | |
# Example: | |
# > User.fish "1245" | |
# # User Load (0.3ms) SELECT "users".* FROM "users" WHERE ("users"."id" BETWEEN '12450000000000000000000000000000' AND '1245ffffffffffffffffffffffffffff') LIMIT $1 [["LIMIT", 2]] | |
# => #<User id: "12451304-761d-4e1d-8281-40aa6213b633", name: "josh"> | |
def self.fish(partial_id) | |
return find(partial_id) unless partial_id.is_a?(String) | |
scrubbed = partial_id.gsub(/[^a-fA-F0-9]/, "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Pull Request Labels | |
// @namespace http://joshuaflanagan.com | |
// @include https://github.com/*/*/pulls | |
// @version 1 | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// ==/UserScript== | |
$(function(){ | |
var $pull_requests = $(".pulls-list .list-browser-item h3"); | |
$pull_requests.each(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Downloads from CI and pushes nuget packages to the official feed" | |
task :release, [:package] do |t, args| | |
require 'open-uri' | |
release_path = "#{buildsupport_path}/nuget_release" | |
clean_dir release_path | |
# The @teamcity_build_id is a unique identifier for the build configuration (looks like "bt234"). You can usually figure it out from your project url | |
artifact_url = "http://teamcity.codebetter.com/guestAuth/repository/downloadAll/#{@teamcity_build_id}/.lastSuccessful/artifacts.zip" | |
puts "downloading artifacts from teamcity.codebetter.com" | |
artifact = open(artifact_url) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using StructureMap; | |
namespace ConsoleApplication1 | |
{ | |
class Program { | |
private static void Main(string[] args) { | |
IContainer container = ConfigureDependencies(); | |
IAppEngine appEngine = container.GetInstance<IAppEngine>(); |
NewerOlder