Skip to content

Instantly share code, notes, and snippets.

@Ceda
Ceda / translate.py
Last active December 7, 2016 21:28
Translate a yaml file with Yandex Translation API
#!/usr/bin/env python3
import argparse;
import json;
import yaml;
import urllib.parse;
import urllib.request;
##
# Translation URI
@Ceda
Ceda / capybara cheat sheet
Created July 24, 2016 08:45 — forked from iqbalhasnan/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
Open Terminal.
Type this command:
cd /System/Library/CoreServices/Finder.app/Contents/Resources/English.lproj/
Now, the file we want to mess around is the InfoPlist.strings. But unfortunately, this file cannot be edited directly using text editor in Lion. But no worries. Run this command to make it editable.
sudo plutil -convert xml1 InfoPlist.strings
Now the file should be editable and readable. Use your favorite text editor and open InfoPlist.strings. I just used vim
sudo vim InfoPlist.strings
@Ceda
Ceda / Gemfile
Created December 11, 2012 01:11 — forked from baldwindavid/Gemfile
The guts of a page tree using slugs - acts_as_tree, friendly_id - Allows for routes like /about/our-people/developers
gem 'acts_as_tree'
gem "friendly_id", "~> 4.0.1"