Made by Your Name
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
server { | |
listen 80 default_server backlog=2048; | |
root /srv/www/build; | |
index index.html; | |
# Make site accessible from http://localhost/ | |
server_name localhost; | |
location / { |
- https://pqrs.org/macosx/keyremap4macbook/pckeyboardhack.html.en
- https://pqrs.org/macosx/keyremap4macbook/index.html.en
- Remap Caps Lock in PcKeyboardHack to 110
- In KeyRemap4MacBook update the private.xml file to the following (misc & uninstall tab)
- On the change key tab click Refresh XML and check the box at the top with the description "Application Key to Control_C"
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
describe 'enqueue' do | |
it 'enqueues the back fill for a site' do | |
expect(ResqueHelpers).to receive(:enqueue) | |
.with(Backfill::ResqueJobs::Site, site_id, start_time, end_time) | |
subject.enqueue | |
end | |
end | |
describe 'enqueue' do | |
it 'enqueues the back fill for a site' do |
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
cd ~/ | |
wget http://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2 | |
mv ~/phantomjs-1.9.0-linux-x86_64.tar.bz2 /usr/local/share | |
cd /usr/local/share | |
sudo tar xvf phantomjs-1.9.0-linux-x86_64.tar.bz2 | |
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 | |
# | |
# This script needs "fpm". If you dont have it, | |
# run "gem install fpm" | |
# | |
# You also need to "apt-get install python-setuptools" (otherwise fpm fails) | |
echo "[ build and install vim from source ]" |
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 | |
# | |
# Install Postgres 9.2 on a clean Ubuntu 12.04 | |
""" | |
LC_ALL issue | |
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file. | |
sudo apt-get install language-pack-en-base | |
sudo dpkg-reconfigure locales | |
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. |
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 DNA | |
attr_reader :strand | |
def initialize(strand) | |
@strand = strand | |
end | |
def hamming_distance(homologous_strand) | |
nucleic_acid_indexes(homologous_strand).each_with_object(0) do |nucleic_acid_index, differences_count| | |
if nucleic_acids_differ?(nucleic_acid_index, homologous_strand) |
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
#models / concerns / create_shout.rb | |
module Concerns | |
module CreateShout | |
extend ActiveSupport::Concern | |
def create | |
content = build_content | |
shout = current_user.shouts.build(content: content) | |
shout.save |