Skip to content

Instantly share code, notes, and snippets.

View ArnisL's full-sized avatar
🦊

Arnis Lapsa ArnisL

🦊
View GitHub Profile
@ebeigarts
ebeigarts / gist:3159994
Last active February 15, 2023 07:05
Icons

729 icons, free, webfont, grayscale

200 icons, free

400 icons, $25

@burke
burke / 0-readme.md
Created January 27, 2012 13:44 — forked from funny-falcon/cumulative_performance.patch
ruby-1.9.3-p327 cumulative performance patch for rbenv

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@codebrew
codebrew / assets.js.erb
Created November 29, 2011 20:31
javascript asset helper
// helper to create proper asset paths if an asset host is configured
App.assets = {
assets : {
<% AssetsUtil.images.each do |img| %>
"<%= img %>" : "<%= asset_path(img) %>",
<% end %>
},
@ArnisL
ArnisL / after.cs
Created October 19, 2011 22:02
refactoring == joy
namespace Interreg.App.Audit.Application{
using Domain.Model.Applications;
public class ApplicationAudit:Audit{
public override void AttachHandlers(){
On<AttachmentAdded>(e=>e.Source.LogEvent(
"Attachment named '{0}' added".With(e.Attachment.Name)));
On<AttachmentRemoved>(e=>e.Source.LogEvent(
"Attachment named '{0}' removed".With(e.Attachment.Name)));
@benedikt
benedikt / rails.rb
Created July 30, 2011 13:16
Capistrano task to open a rails console on a remote server. Require this file in your deploy.rb and run "cap rails:console"
# encoding: UTF-8
Capistrano::Configuration.instance(:must_exist).load do
namespace :rails do
desc "Open the rails console on one of the remote servers"
task :console, :roles => :app do
hostname = find_servers_for_task(current_task).first
exec "ssh -l #{user} #{hostname} -t 'source ~/.profile && #{current_path}/script/rails c #{rails_env}'"
end
end
# In your test_helper.rb
class ActiveRecord::Base
mattr_accessor :shared_connection
@@shared_connection = nil
def self.connection
@@shared_connection || retrieve_connection
end
end