This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Desired Behavior Module | |
| # Unit Testing, Why and How | |
| # MiniTest Example | |
| class FizzBuzzTest < MiniTest::Test | |
| def setup | |
| @fizz_buzz = FizzBuzz.new | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://www.man42.net/blog/2014/04/debian-xfce4-spotify/ | |
| # For the Next key: Click Add, then on the Command: field enter: | |
| dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next | |
| # For the Previous key: Click Add, then on the Command: field enter | |
| dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous | |
| # For the PlayPause key: Click Add, then on the Command: field enter: | |
| dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ---- Base Node ---- | |
| FROM alpine:3.5 | |
| RUN apk add --no-cache nodejs-current tini make gcc g++ python krb5-dev | |
| # set working directory | |
| WORKDIR . | |
| # Set tini as entrypoint | |
| ENTRYPOINT ["/sbin/tini", "--"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JavaScript - RxJS Observables | |
| // *Documentation: http://reactivex.io * | |
| var button = document.querySelector('button'); | |
| Rx.Observable.fromEvent(button, 'click) | |
| .subscribe( | |
| (value) => { | |
| console.log(value.clientX); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run: pip install requests | |
| # Notes: https://programminghistorian.org/lessons/output-data-as-html-file | |
| import requests | |
| from web browser import open_new_tab | |
| def _create_html_body(body, breed): | |
| file = open('dogs.html', 'w') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import urllib.request | |
| if __name__ == "__main__": | |
| NAME_LIST_LOCATION = './names.csv' | |
| TWITTER_URL = 'http://www.twitter.com/' | |
| try: | |
| names = None | |
NewerOlder