Skip to content

Instantly share code, notes, and snippets.

import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
# import chromedriver_autoinstaller
import subprocess
import shutil
@joaquindev
joaquindev / afplaypause
Created January 18, 2018 11:59 — forked from bradbatt/afplaypause
Universal Play / Pause script for afplay
#!/bin/zsh
afplay_status=$(ps -clx | grep 'afplay' | awk '{print $11}')
if [[ $afplay_status == T ]] then
killall -CONT -c "afplay"
else
killall -STOP -c "afplay"
fi
@joaquindev
joaquindev / bash_profile.md
Created November 27, 2017 06:10 — forked from irazasyed/bash_profile.md
Terminal: Mac OS X Terminal Aliases & How-To - .bash_profile / .profile

Mac OS X Terminal Aliases & How-To

Collection of some of my fav terminal aliases that i use often & collected from the web. This file will be updated with more aliases as i find more. Feel free to comment and share your fav aliases you use :)

###Follow these simple steps to add the following aliases:###


  1. Within the Terminal, run:
@joaquindev
joaquindev / rtspinsidehtml
Created September 11, 2014 08:12
Play rtsp stream inside an html file
<embed type="application/x-vlc-plugin"
pluginspage="http://www.videolan.org"
autoplay="yes" loop="no" width="300" height="200"
target="rtsp://<STREAM>"/>
<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://download.videolan.org/pub/videolan/vlc/last/win32/axvlc.cab" style="display:none;"></object>
@joaquindev
joaquindev / android-stationadapter
Last active August 29, 2015 13:57
stationadapter
private static class StationAdapter extends BaseAdapter {
private LayoutInflater inflater;//Instantiates a layout XML into its corresponding View objects
private List<Station> allStations;
@Override
public int getCount() {
return 0;
}
@joaquindev
joaquindev / android-layout-template
Last active August 29, 2015 13:57
layout template
/*
From Just for you App!
*/
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="200dp"
android:layout_width="match_parent">
/* src/ejemploConBiblioteca.js */
var biblioteca = require('./miBiblioteca');
var unaBombilla = new biblioteca.Bombilla();
console.log("La bombilla esta " + unaBombilla.estaEncendida());
unaBombilla.encender();
console.log("La bombilla esta " + unaBombilla.estaEncendida());
/* src/miBiblioteca.js */
module.exports.module1 = require('./miModulo1.js');
module.exports.module2 = require('./miModulo2.js');
/* src/ejemploConPrototype.js */
var Bombilla = require('./miModulo.js');
var unaBombilla = new Bombilla();
console.log("La bombilla esta " + unaBombilla.estaEncendida());
unaBombilla.encender();
console.log("La bombilla esta " + unaBombilla.estaEncendida());
/* src/miModulo.js */
module.exports = Iluminacion;
function Iluminacion(){
this.interruptor = false;
}
Iluminacion.prototype.encender = function(){
this.interruptor = true;
}