Skip to content

Instantly share code, notes, and snippets.

View taytus's full-sized avatar

Roberto Inetti taytus

View GitHub Profile
@taytus
taytus / install-chrome-headless.sh
Created July 17, 2018 14:41 — forked from pragmaticivan/install-chrome-headless.sh
Installing headless chrome on Ubuntu.
#!/bin/bash
# from https://chromium.woolyss.com/
# and https://gist.github.com/addyosmani/5336747
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser
chromium-browser --headless --no-sandbox http://example.org/
@taytus
taytus / install.sh
Created July 16, 2018 19:19 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@taytus
taytus / GenBoxShadow.php
Created October 4, 2012 04:36 — forked from seanlinehan/GenBoxShadow.php
Create a pure-CSS version of any image
// Do whatever you'd like with the script! Show it off, mod it up, post it places, or whatever. :)
// (If you do, I wouldn't mind a Twitter shoutout at @_slinehan when appropriate!)
$imageURL = "URL HERE";
$image = imagecreatefromjpeg($imageURL);
$width = imagesx($image);
$height = imagesy($image);
// First, let's resize the image to something manageable while maintaining aspect ratio.
@taytus
taytus / dfux
Created May 2, 2012 18:14
Default FTP username for XAMPP
user 'nobody'
password 'xampp'
@taytus
taytus / gtsv
Created April 27, 2012 05:25
Google two step verification - app specific password
https://accounts.google.com/b/0/IssuedAuthSubTokens
@taytus
taytus / GDWI
Created April 26, 2012 15:47
Google Drive windows installer URL
https://tools.google.com/dlpage/drive
@taytus
taytus / gist:2313063
Created April 5, 2012 18:26
Get events working with GoogleCharts
function drawVisualization() {
// Create and populate the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Task');
data.addColumn('number', 'Hours per Day');
data.addRows(5);
data.setValue(0, 0, 'Work');
data.setValue(0, 1, 11);
data.setValue(1, 0, 'Eat');
data.setValue(1, 1, 2);
@taytus
taytus / gist:2308395
Created April 5, 2012 06:12
Install sublime text 2 on Ubuntu
sudo add-apt-repository ppa:webupd8team/sublime-text-2;
sudo apt-get update;
sudo apt-get install sublime-text-2
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
@taytus
taytus / FizzBuzz.php
Created March 6, 2012 15:00
FizzBuzz solution in PHP
for ($i = 1; $i <= 100; $i++)
{
if($i % 3 == 0 && $i % 5 ==0){
echo "FizzBuzz<br />";
}
else if($i % 3 == 0){
echo "Fizz<br />";
}
else if($i % 5 == 0){
echo "Buzz<br />";