- Define [jQuery][] callback events
- Change the DOM based on events
- Write custom event handlers in JavaScript and jQuery
- Build a pure JavaScript application
- Write OO-JavaScript
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
| require 'csv' | |
| versions = [*700..757] | |
| output = [] | |
| versions.each do |version| | |
| `git checkout #{version}` | |
| output << [version, `git grep 'vanilla' | wc -l`.chomp.strip.to_i] | |
| 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
| from flask import Flask, render_template, Response | |
| from PIL import Image | |
| from StringIO import StringIO | |
| import pygame.camera | |
| import pygame.image | |
| STREAM_URL = 'http://192.168.1.87:8080/?action=stream' |
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
| SAMPLE = :loop_breakbeat | |
| live_loop :beats do | |
| sample_to_play = SAMPLE | |
| rate = 0.7 | |
| if rand(10) == 5 | |
| rate *= -1 | |
| 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
| require "formula" | |
| class KitchenSync < Formula | |
| homepage "https://github.com/willbryant/kitchen_sync" | |
| url "https://github.com/willbryant/kitchen_sync/archive/0.47.tar.gz" | |
| sha1 "b222273ca35be5e6d9dd609cd1532d204c88cee0" | |
| depends_on "cmake" => :build | |
| depends_on "boost" | |
| depends_on "yaml-cpp" |
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 Contract | |
| def initialize(contracts = []) | |
| @contracts = contracts | |
| @contracts << block.to_proc | |
| end | |
| def add | |
| self.new(@contracts, &block.to_proc) | |
| 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
| BAR_DURATION = 4 | |
| define :kick do | |
| rate = 0.8 | |
| sample :drum_heavy_kick, rate: rate | |
| sleep sample_duration(:drum_heavy_kick) * rate | |
| end | |
| define :snare do | |
| sample :drum_snare_hard |
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
| 105802000090076405200400819019007306762083090000061050007600030430020501600308900 | |
| 005030081902850060600004050007402830349760005008300490150087002090000600026049503 | |
| 105802000090076405200400819019007306762083090000061050007600030430020501600308900 | |
| 005030081902850060600004050007402830349760005008300490150087002090000600026049503 | |
| 290500007700000400004738012902003064800050070500067200309004005000080700087005109 | |
| 080020000040500320020309046600090004000640501134050700360004002407230600000700450 | |
| 608730000200000460000064820080005701900618004031000080860200039050000100100456200 | |
| 370000001000700005408061090000010000050090460086002030000000000694005203800149500 | |
| 000689100800000029150000008403000050200005000090240801084700910500000060060410000 | |
| 030500804504200010008009000790806103000005400050000007800000702000704600610300500 |
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 glob | |
| import os | |
| import time | |
| FILE_GLOB = './data/*' | |
| FILECOUNT_LIMIT = 30 | |
| FREQUENCY_OF_CHECK_IN_SECONDS = 5 | |
| def check_for_and_remove_files(): | |
| files = glob.glob(FILE_GLOB) |
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
| *.pyc | |
| matches.csv | |