Skip to content

Instantly share code, notes, and snippets.

View ignacy's full-sized avatar
🦆
duck typing

Ignacy Moryc ignacy

🦆
duck typing
View GitHub Profile
(defun sublime-text-2 ()
(interactive)
(color-theme-install
'(sublime-text-2
((background-color . "#171717")
(background-mode . light)
(border-color . "#1a1a1a")
(cursor-color . "#fce94f")
(foreground-color . "#cfbfad")
(mouse-color . "black"))
#/bin/bash
# stolen from http://kingstonlabs.co.uk/blog/how-to-install-solr-36-on-ubuntu-1204/
sudo apt-get update; sudo apt-get upgrade -y;
# Install solr and jetty packages
sudo apt-get install jetty openjdk-7-jdk libjetty-extra unzip -y
cd ~;
wget http://www.eng.lsu.edu/mirrors/apache/lucene/solr/3.6.2/apache-solr-3.6.2.tgz
tar -xvzf *.tgz;
rm *.tgz;
@ignacy
ignacy / pr.md
Created May 13, 2013 08:45 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

#jruby hacks
jps -ml #show java processes running
jstack <pid> #get a jvm stack info
jruby -J-Djruby.reify.classes=true # a flag that tell jruby to compile ruby classes to real (matching) java classes
jvisualvm #great profiling tool
@ignacy
ignacy / rubocop_pre_commit_hook
Created August 18, 2016 06:37 — forked from mpeteuil/rubocop_pre_commit_hook
Ruby style guide git pre-commit hook using Rubocop as the style guide checker. Only runs on staged ruby files that have been added and/or modified.
#!/usr/bin/env ruby
require 'english'
require 'rubocop'
ADDED_OR_MODIFIED = /A|AM|^M/.freeze
changed_files = `git status --porcelain`.split(/\n/).
select { |file_name_with_status|
file_name_with_status =~ ADDED_OR_MODIFIED
@ignacy
ignacy / pl-colemak.json
Created January 4, 2021 12:23 — forked from 39aldo39/pl-colemak.json
Polish Colemak
{
"fullName": "Polish (Colemak)",
"name": "pl-colemak",
"singletonKeys": [
[ "Alt_R", "AltGr" ]
],
"shiftstates": [ "None", "Shift", "AltGr", "Shift+AltGr" ],
"keys": [
{ "pos": "~", "letters": [ "`", "~", "tilde", "~" ] },
{ "pos": "1", "letters": [ "1", "!", "¡", "¹" ] },
@ignacy
ignacy / ruby_on_rails_deployment.md
Created December 30, 2022 07:47 — forked from zentetsukenz/ruby_on_rails_deployment.md
Deploy Ruby on Rails application with Docker Compose and Capistrano with ease

Docker

Files and Folders.

|
|\_ app
|...
|\_ docker
| |