This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8" /> | |
<link href="http://fonts.googleapis.com/css?family=Miltonian+Tattoo" rel"stylesheet" type="text/css"> | |
<style type="text/css"> | |
body{margin:15px;} | |
h1{font-family: "Miltonian Tattoo", cursive;} | |
div{} |
This file contains hidden or 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
function sketchProc(processing) { | |
// Override draw function, by default it will be called 60 times per second | |
processing.draw = function() { | |
// determine center and max clock arm length | |
var centerX = processing.width / 2, centerY = processing.height / 2; | |
var maxArmLength = Math.min(centerX, centerY); | |
function drawArm(position, lengthScale, weight) { | |
processing.strokeWeight(weight); | |
processing.line(centerX, centerY, | |
centerX + Math.sin(position * 2 * Math.PI) * lengthScale * maxArmLength, |
This file contains hidden or 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
sfgsefgdfgsdfgs |
Automatic fonctional tests can be created with the Selenium extension on the browser Firefox. Selenium tests are located in the folder tests/selenium
.
You can follow this tutorial to create a new test.
To let time to the jQuery to understand what's going on, add the pause
commande , exemple jquery wait for an ajax request to append the results the a form input.
Here is the basic command, it follow the same syntaxe has the selenium log : | command | param1 | param2 |
.
This file contains hidden or 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
# this was surprisingly difficult to find, the documentation and API is poor | |
require "net/http" | |
require "uri" | |
url = URI.parse("http://www.whatismyip.com/automation/n09230945.asp") | |
req = Net::HTTP::Get.new(url.path) | |
req.add_field("X-Forwarded-For", "0.0.0.0") | |
# For content type, you could also use content_type=(type, params={}) |
This file contains hidden or 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 'phonelib' | |
number = "9549233221" | |
country = "US" | |
puts "\nPhonelib.valid_for_country? '#{number}', '#{country}' :" | |
puts Phonelib.valid_for_country? number, country | |
This file contains hidden or 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 'rmagick' | |
def resize(file_path) | |
file = Image.new |
This file contains hidden or 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
default: &default | |
adapter: mysql2 | |
encoding: utf8mb4 | |
username: root | |
password: | |
host: 127.0.0.1 | |
port: 3306 | |
development: | |
<<: *default |
OlderNewer