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 | |
{ | |
echo $(date) | |
echo ">>>Disk found" | |
echo ">>>Setting the title..." | |
title=$(makemkvcon -r info) | |
title=`echo "$title" | grep "DRV:0\+"` | |
title=${title:53} |
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
# code inspired from http://jainmarket.blogspot.com/2009/05/creating-custom-table-view-cell.html | |
class CustomCell < UITableViewCell | |
attr_accessor :primaryLabel | |
attr_accessor :secondaryLabel | |
def createLabels | |
@primaryLabel = UILabel.alloc.init |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Stripe Getting Started Form</title> | |
<script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
<!-- jQuery is used only for this example; it isn't required to use Stripe --> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
// this identifies your website in the createToken call below |
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
require( './boot' ); | |
var DbItem = require( './db_item' ) | |
, item = new DbItem( '123456abcdefg' ); | |
item.queue( function( error , response ){ | |
console.log( 'Response: ' + response ); | |
process.exit(); | |
} ); |
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
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
* Off the top of my head * | |
1. Fork their repo on Github | |
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
git remote add my-fork git@github...my-fork.git |
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
=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') |