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
| module Divisable | |
| def divided_by?(num, divisor) | |
| num % divisor == 0 | |
| end | |
| end | |
| class CracklePop | |
| include Divisable | |
| def initialize |
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
| #!/usr/bin/env ruby | |
| require 'selenium-webdriver' | |
| require 'rmagick' | |
| include Magick | |
| browser = Selenium::WebDriver.for :firefox | |
| browser.get 'https://twitter.com' | |
| element = browser.find_element(id: 'signin-email').send_keys('ahmgeek') | |
| password = File.open('./pass.txt', 'r').read.strip |
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
| Have you ever wondered, what is a movie file ? | |
| Movie files have a few basic components. | |
| First, the file itself is called a container, and the type of container determines where the information | |
| in the file goes. Examples of containers are AVI and Quicktime. Next, you have a bunch of streams; for example, | |
| you usually have an audio stream and a video stream. | |
| (A "stream" is just a fancy word for "a succession of data elements made available over time".) | |
| The data elements in a stream are called frames. Each stream is encoded by a different kind of codec. | |
| The codec defines how the actual data is COded and DECoded - hence the name CODEC. Examples of codecs are DivX and MP3. | |
| Packets are then read from the stream. Packets are pieces of data that can contain bits of data |
NewerOlder