Skip to content

Instantly share code, notes, and snippets.

View amitaibu's full-sized avatar

Amitai Burstein amitaibu

View GitHub Profile
update : Action -> Model -> (Model, Effects Action)
update action model =
case action of
RequestMore ->
( model
, getRandomGif model.topic
)
NewGif maybeUrl ->
( Model model.topic (Maybe.withDefault model.gifUrl maybeUrl)
NewGif maybeUrl ->
( Model model.topic (Maybe.withDefault model.gifUrl maybeUrl)
, Effects.task (Task.sleep (5 * second) `andThen` \_ -> NewGif)
)
docker run --rm --name=ch -p=0.0.0.0:8484:8484 -p=0.0.0.0:2222:2222 \
-p=0.0.0.0:4444:4444 -p=0.0.0.0:5920:5900 \
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 \
-e VNC_PASSWORD=hola -e WITH_GUACAMOLE=true \
-e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" \
elgalu/selenium:v2.46.0-base1
"webdrivercss": "https://github.com/amitaibu/webdrivercss/tarball/076e31af7101ee27c3977c6210dd138bdc6010bd",
#!/usr/bin/env bash
# Execute: ./pantheon-site/upgrade_scripts/your_script.sh dev
if [ $# -eq 0 ]
then
echo "You must pass the Pantheon enviorement (dev, test, live)"
exit 1
fi
echo -n "Is this a good question (y/n)? "
read answer
if echo "$answer" | grep -iq "^y" ;then
echo Yes
else
echo No
fi
drush @pantheon.shoov.live updb -y --strict=0
drush @pantheon.shoov.live cc all --strict=0
drush @pantheon.shoov.live fr shoov_ci_build -y --strict=0
drush @pantheon.shoov.live scr profiles/shoov/modules/custom/shoov_ci_build/scripts/update_interval.php --strict=0
npm install -g nodemon
npm install
BACKEND_URL=http://localhost/shoov/www \
nodemon bin/www --name=shoov-nodejs
@amitaibu
amitaibu / gist:cf0b42ea025b965bedb8
Last active August 29, 2015 14:23
Install shoov-nodejs on ubuntu
# Install docker
wget -qO- https://get.docker.com/ | sh
sudo usermod -aG docker user
# Exit and re-login
exit
# Pull docker containers
docker pull amitaibu/php-ci
docker pull elgalu/selenium:v2.46.0-base1
## ssh [email protected]
sudo locale-gen UTF-8
# https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04
# Add user called "selenium"
adduser selenium
# Add sudo to user "selenium"
gpasswd -a selenium sudo