Skip to content

Instantly share code, notes, and snippets.

View evandrocoan's full-sized avatar
💤
Sleeping...

evandrocoan

💤
Sleeping...
View GitHub Profile
@evandrocoan
evandrocoan / canonical.php
Last active April 24, 2022 23:35 — forked from lazysod/canonical.php
Generate a canonical URL using PHP
<?php
$url = "http://domainname.com{$_SERVER['SCRIPT_NAME']}";
echo "<link rel='canonical' href=$url>";
?>
# Matching open parenthesis outside double or single quotes.md
# Copyright (c) 2019 Evandro Coan
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
@dlon
dlon / build_ui.ps1
Last active February 20, 2019 02:57 — forked from vermiceli/build_ui.ps1
# This is a powershell commandlet equivalent of build_ui.sh for installation on Windows
# Generate python files based on the designer ui files.
# If you need to modify the python location or pyuic5/pyrcc5 path, just change the 2 variables below
$pythonPath = "C:\Python36\"
$pyqtScripts = Join-Path $pythonPath "\Scripts\"
If (!(Test-Path "designer")) {
Write-Host "Please run this from the project root"
Exit
@dweldon
dweldon / install-docker.sh
Last active April 8, 2022 11:18
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@andreidbr
andreidbr / soundPlayingTest.java
Last active April 22, 2021 15:21
A Selenium test to check if a sound is playing / has played
@Test(testName = "Listen for Sound", description = "Check that, when clicking the 'A' key, a sound is played", groups = {"01Drums"})
public void soundPlayTest() throws InterruptedException {
driver.findElement(By.xpath("/html/body/div[2]/div[1]")).click();
WebElement aKey = driver.findElement(By.xpath("/html/body/div/div[1]"));
Actions builder = new Actions(driver);
Action sendAKey = builder.moveToElement(aKey).sendKeys("A").build();
sendAKey.perform();
Thread.sleep(1000);
WebElement audio = driver.findElement(By.tagName("audio"));
# Remove Trailing Whitespaces from Project.md
# Copyright (c) 2019 Evandro Coan
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
#
# Licensing
#
# Snippet
# Copyright (C) 2018 Evandro Coan <https://github.com/evandrocoan>
#
# OS ARQUIVOS NESTE REPOSITÓRIO SÃO FORNECIDOS "NO ESTADO EM QUE SE ENCONTRAM", SEM GARANTIA DE
# QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO ÀS GARANTIAS DE
# COMERCIALIZAÇÃO, APTIDÃO PARA UM PROPÓSITO ESPECÍFICO E NÃO INFRACÇÃO. EM NENHUMA CIRCUNSTÂNCIA, OS
#
# Licensing
#
# Snippet
# Copyright (C) 2018 Evandro Coan <https://github.com/evandrocoan>
#
# OS ARQUIVOS NESTE REPOSITÓRIO SÃO FORNECIDOS "NO ESTADO EM QUE SE ENCONTRAM", SEM GARANTIA DE
# QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO ÀS GARANTIAS DE
# COMERCIALIZAÇÃO, APTIDÃO PARA UM PROPÓSITO ESPECÍFICO E NÃO INFRACÇÃO. EM NENHUMA CIRCUNSTÂNCIA, OS
#
# Licensing
#
# Snippet
# Copyright (C) 2018 Evandro Coan <https://github.com/evandrocoan>
#
# OS ARQUIVOS NESTE REPOSITÓRIO SÃO FORNECIDOS "NO ESTADO EM QUE SE ENCONTRAM", SEM GARANTIA DE
# QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO ÀS GARANTIAS DE
# COMERCIALIZAÇÃO, APTIDÃO PARA UM PROPÓSITO ESPECÍFICO E NÃO INFRACÇÃO. EM NENHUMA CIRCUNSTÂNCIA, OS
# AUTORES OU TITULARES DE DIREITOS AUTORAIS SERÃO RESPONSÁVEIS POR QUALQUER RECLAMAÇÃO, DANOS OU OUTRA
#
# Licensing
#
# Snippets
# Copyright (C) 2018 Evandro Coan <https://github.com/evandrocoan>
#
# OS ARQUIVOS NESTE REPOSITÓRIO SÃO FORNECIDOS "NO ESTADO EM QUE SE ENCONTRAM", SEM GARANTIA DE
# QUALQUER TIPO, EXPRESSA OU IMPLÍCITA, INCLUINDO, MAS NÃO SE LIMITANDO ÀS GARANTIAS DE