Skip to content

Instantly share code, notes, and snippets.

Avatar

Atsushi Kataoka croudsky

View GitHub Profile
View gist:10446265
# Add this to more_web_steps.rb
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today!
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text|
alert = page.driver.browser.switch_to.alert
alert.text.should eq(text)
alert.send(action)
end
View CentOS_php.sh
#!/bin/sh
set -e
source ~/.bash_profile
echo "■■ Updates packages. Asks for your password. ■■"
sudo yum update -y
echo "■■ Installs packages. Give your password when asked. ■■"
sudo yum groupinstall -y 'Development tools'
sudo yum install -y git mysql-server gcc gcc-c++ make openssl-devel re2c libmcrypt libmcrypt-devel libxml2-devel bison bison-devel curl-devel libjpeg-devel libpng-devel libmcrypt-devel readline-devel libtidy-devel libxslt-devel httpd-devel enchant-devel libXpm libXpm-devel freetype-devel t1lib t1lib-devel gmp-devel libc-client-devel libicu-devel oniguruma-devel net-snmp net-snmp-devel bzip2-devel libtool-ltdl-devel subversion httpd ImageMagick ImageMagick-devel libmcrypt-devel
View spread.sass
// strip-units required by spread mixin
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass
@function strip-units($number)
@return $number / ($number * 0 + 1)
// pow and sqrt required by ease function
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss
@function pow($base, $exponent)
$value: $base
You can’t perform that action at this time.