Skip to content

Instantly share code, notes, and snippets.

@revskill
revskill / content
Last active August 29, 2015 14:15
VIPER
View:
- Show the content received from Presenter
- Notifies user's action to Presenter
- Presenter doesn't know anything about UI
Presenter:
- Include logic to format the view
- Gets data from Interactor
- Receive action from View and traduce to Navigation Action (Wireframe) and Interactor request
Interactor:
- Associated to a uniq use case of the application
@revskill
revskill / IT.txt
Created January 31, 2015 10:36
Bookmarks
http://www.atmarkit.co.jp/ait/subtop/coding/
@revskill
revskill / README.md
Last active August 29, 2015 14:10 — forked from fnichol/README.md

Why?

There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.

From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?

Installation

The Ruby Way! (Fun)

#Getting Started

##Webpage:

<html>
<head>
    <title>Testing with Ruby and Selenium WebDriver</title>
</head>
 
<body bgcolor="antiquewhite">
@revskill
revskill / answer
Created November 19, 2014 06:22
adb servr didn'nt ack
http://stackoverflow.com/questions/5703550/my-eclipse-adb-server-didnt-ack-failed-to-start-daemon
@revskill
revskill / Gemfile
Last active August 29, 2015 14:09
Wordpress API in Ruby
gem 'jdbc-mysql'
gem 'activerecord-jdbcmysql-adapter'
gem 'puma'
gem 'sinatra'
@revskill
revskill / Problem
Created November 16, 2014 00:07
cordova platform add android not working while listing Android targets
I got problem when i want to add an android platform to my phoneGap application. I got this message in my CLI when i execute the command cordova platform add android :
Checking Android requirements... (Error: An error occurred while listing Android targets)
I already try to add my android sdk location in the path variable.
Please help me ! :D
@revskill
revskill / config.rb
Last active August 29, 2015 14:09
Ruby ActiveRecord configuration
require 'active_record'
require 'sqlite3' # or 'pg' or 'sqlite3'
# Change the following to reflect your database settings
ActiveRecord::Base.establish_connection(
adapter: 'sqlite3', # or 'postgresql' or 'sqlite3'
database: 'health.sqlite'
)
ActiveRecord::Schema.define do
JARS_PATH = File.join(RAILS_ROOT, "lib/jars")
Dir["#{JARS_PATH}/*jar"].each {|j| require j} #Suck the jars.
require "java"
import org.apache.pdfbox.pdfparser.PDFParser
import org.apache.pdfbox.pdmodel.PDDocument
import org.apache.pdfbox.util.PDFTextStripper
import org.apache.poi.extractor.ExtractorFactory
#importing all the required classes.
@echo off
SET st2Path=C:\Program Files\Sublime Text 2\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2" /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 2\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 2" /t REG_SZ /v "" /d "Open with Sublime Text 2" /f