YARD CHEATSHEET http://yardoc.org
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
import random | |
titles = ['In Sit Est', 'Interdum Posuere Adipiscing', 'Venenatis Lacus A Aliquet', 'Nulla Amet Eget Ac Fermentum', 'Nec Vivamus Tortor', 'Primis Fringilla Commodo', 'Aenean Sit Eget', 'Amet Eget Sapien', 'Porttitor Vitae Neque Aliquam', 'In Adipiscing Ut Interdum Justo', 'Non Nec A Nunc', 'Et Sed Lacus', 'At Sollicitudin Dolor', 'Ligula Bibendum Sagittis Tincidunt In', 'Et At Commodo Nibh Etiam', 'Sem Est Sapien', 'Venenatis Ante Dolor Quam Id', 'Risus Placerat Interdum Malesuada Non', 'Habitasse Nunc Justo Eget', 'Donec Sed Vulputate', 'Feugiat Consectetur Enim', 'Vestibulum Donec Ac Sed Ante', 'Habitasse Sit Tortor', 'Et Nec Amet'] | |
bodies = ['Vestibulum consequat orci nec quam aliquam, eu imperdiet diam sagittis. Nam pharetra scelerisque libero a sollicitudin. Curabitur eget mattis arcu. Morbi pellentesque tempus metus, id tempor justo varius in. Morbi congue, dolor ac viverra auctor, lectus nisi tincidunt quam, ac dignissim justo est et orci. Etiam placerat massa eros, in placerat mauris v |
SET !ERRORIGNORE YES | |
SET !TIMEOUT_STEP 0 | |
EVENT TYPE=CLICK SELECTOR="#ui-id-1" BUTTON=0 | |
WAIT SECONDS=0.1 | |
EVENT TYPE=CLICK SELECTOR="#buyrig" BUTTON=0 | |
EVENT TYPE=CLICK SELECTOR="#buybase" BUTTON=0 | |
EVENT TYPE=CLICK SELECTOR="#buyrocket" BUTTON=0 | |
EVENT TYPE=CLICK SELECTOR="#buykitten" BUTTON=0 | |
EVENT TYPE=CLICK SELECTOR="#buykennel" BUTTON=0 |
#!/bin/bash | |
sudo apt-get install r-base r-base-dev r-cran-testthat | |
wget -c `wget -qO- http://www.rstudio.com/ide/download/desktop | grep "Ubuntu" | grep "amd64\.deb" | sed -n "/href/ s/.*href=['\"]\([^'\"]*\)['\"].*/\1/gp" | head -1` && \ | |
sudo apt-get -f install && \ | |
sudo apt-get -y install libjpeg62 && \ | |
sudo apt-get -y install libcurl4-openssl-dev && \ | |
sudo dpkg -i rstudio-*-amd64.deb && \ | |
sudo rm -f rstudio-*-amd64.deb && \ | |
echo 'install.packages("swirl", repos="http://cran.r-project.org" )' | sudo R --no-save && \ | |
sudo rm -f jumpstart_R.sh |
#!/bin/bash | |
RMDFILE=$1 # The filename without .md extention | |
Rscript -e "require(knitr); require(markdown); knit('$RMDFILE.Rmd', '$RMDFILE.md'); markdownToHTML('$RMDFILE.md', '$RMDFILE.html', options=c('use_xhml'))" | |
pandoc -s $RMDFILE.md -o $RMDFILE.pdf |
from SimpleCV import Image | |
import pytesseract | |
img = Image("http://i.imgur.com/LU4q5IK.jpg") | |
img = img.invert().binarize().scale(5) | |
pytesseract.image_to_string(img) | |
# Out[5]: '58 +69' |
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
# RescueTime Data Exporter | |
# Dan Nixon 18/09/2011 | |
# Chris Burgess 03/08/2015 | |
# Brice Luu 20/05/2016 | |
# Kerem Bozdas 29/05/2016 | |
import urllib |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.
Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer.
In that case, the programmer isn't allowed to say x = true
; that would be an invalid program.
The compiler will refuse to compile it, so we can't even run it.
#!/usr/bin/env ruby | |
# <bitbar.title>Life Percentage</bitbar.title> | |
# <bitbar.version>v1.0</bitbar.version> | |
# <bitbar.author>Kerem Bozdaş</bitbar.author> | |
# <bitbar.author.github>krmbzds</bitbar.author.github> | |
# <bitbar.desc>Shows what percentage of life you have lived.</bitbar.desc> | |
# <bitbar.image>http://i.imgur.com/DbXIhiS.png</bitbar.image> | |
# <bitbar.dependencies>ruby</bitbar.dependencies> |
<snippet> | |
<content><![CDATA[ | |
class $1Worker | |
include Sidekiq::Worker | |
sidekiq_options :queue => :${2:default}, :retry => ${3:1}, :backtrace => ${4:false} | |
def perform($5) | |
$6 | |
end |