This file contains 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
UPLOAD_ENDPOINT = 'https://api.soundcloud.com/tracks' | |
access_token = $('[data-soundcloud-upload]').data('soundcloud-upload') | |
$('#soundcloud-upload').change () -> | |
data = new FormData() | |
field = $('#soundcloud-upload')[0] | |
$.each field.files, (i, file) -> | |
data.append 'track[asset_data]', file | |
data.append 'track[title]', file.name |
This file contains 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
DEFAULT_PATH=$PATH | |
# ... | |
# add ./bin to path for Spring (rails) | |
add_bin_to_path_if_necessary() { | |
if [[ -d ./bin ]]; then | |
export PATH=./bin:$DEFAULT_PATH | |
else | |
export PATH=$DEFAULT_PATH |
This file contains 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
" <Leader>u will convert "I am following User1, User2, and User3" => i_am_following_user1_user2_and_user3 | |
nnoremap <Leader>u Vi" :<C-w>%s/\%V,*\s/_/g<CR> :normal ds" guaW<CR> | |
This file contains 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
$ -> | |
$('.filepicker-input').change (e, data) -> | |
url = e.originalEvent.fpfile.url | |
$('.js-filepicker-preview').attr('src', url) | |
$(this).closest('form').submit() |
This file contains 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
Simple demonstrations of putting AVR microcontrollers to sleep in power-down mode, | |
which results in minimum current. Coded with Arduino IDE version 1.0.4 (and with | |
the Arduino-Tiny core for the ATtiny MCUs, http://code.google.com/p/arduino-tiny/) | |
For ATmega328P, ~0.1µA. | |
For ATtinyX5 revisions that implement software BOD disable, ~0.1µA, | |
for ATtinyX5 revisions that don't, ~20µA. |
This file contains 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
# ============================================================================= | |
# Font Custom Configuration | |
# This file should live in the directory where you run `fontcustom compile`. | |
# For more info, visit <https://github.com/FontCustom/fontcustom>. | |
# ============================================================================= | |
# ----------------------------------------------------------------------------- | |
# Project Info | |
# ----------------------------------------------------------------------------- |
This file contains 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
# spec/formatters/feature_error_progress_formatter.rb | |
require 'rspec/core/formatters/progress_formatter.rb' | |
class FeatureErrorProgressFormatter < RSpec::Core::Formatters::ProgressFormatter | |
LINES_OF_CONTEXT = 15 | |
TEXT_TO_SEARCH = "Internal Server Error" | |
FILE_TO_SEARCH = "log/test.log" | |
private |