One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| .markdown-here-wrapper { | |
| font-size: 16px; | |
| line-height: 1.8em; | |
| letter-spacing: 0.1em; | |
| } | |
| pre, code { | |
| font-size: 14px; | |
| font-family: Roboto, 'Courier New', Consolas, Inconsolata, Courier, monospace; |
| // direct check for external keyboard | |
| + (BOOL)_isExternalKeyboardAttached | |
| { | |
| BOOL externalKeyboardAttached = NO; | |
| @try { | |
| NSString *keyboardClassName = [@[@"UI", @"Key", @"boa", @"rd", @"Im", @"pl"] componentsJoinedByString:@""]; | |
| Class c = NSClassFromString(keyboardClassName); | |
| SEL sharedInstanceSEL = NSSelectorFromString(@"sharedInstance"); | |
| if (c == Nil || ![c respondsToSelector:sharedInstanceSEL]) { |
| # Will make autocomplete trigger with 'enter' instead of 'tab' | |
| 'atom-text-editor:not(mini) .autocomplete-plus.autocomplete-suggestion-list': | |
| 'tab': 'unset!' | |
| 'enter': 'autocomplete-plus:confirm' | |
| # Use 'expand-abbreviation' instead of 'expand-abbreviation-with-tab' for tab keybinding | |
| '.pane .editor:not(.mini)': | |
| 'tab': 'emmet:expand-abbreviation' |
Other people's projects:
My projects (tutorials are on my blog at http://maxoffsky.com):
| // | |
| // HWKViewController.m | |
| // HardwareKeyboardUI | |
| // | |
| // Created by Steven Troughton-Smith on 13/11/2013. | |
| // Copyright (c) 2013 High Caffeine Content. All rights reserved. | |
| // | |
| #import "HWKViewController.h" |
| - (BOOL)stringContainsEmoji:(NSString *)string { | |
| __block BOOL returnValue = NO; | |
| [string enumerateSubstringsInRange:NSMakeRange(0, [string length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock: | |
| ^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { | |
| const unichar hs = [substring characterAtIndex:0]; | |
| // surrogate pair | |
| if (0xd800 <= hs && hs <= 0xdbff) { | |
| if (substring.length > 1) { | |
| const unichar ls = [substring characterAtIndex:1]; |
| var http = require('http'), | |
| fileSystem = require('fs'), | |
| path = require('path') | |
| util = require('util'); | |
| http.createServer(function(request, response) { | |
| var filePath = 'path_to_file.mp3'; | |
| var stat = fileSystem.statSync(filePath); | |
| response.writeHead(200, { |
| #!/usr/bin/env ruby | |
| # Invokes unzip for each file in a given directory | |
| completed_files = Array.new | |
| current_directory = Dir.getwd | |
| Dir.foreach(current_directory) do |file_name| | |
| if (file_name.include?(".zip") && !completed_files.include?(file_name)) | |
| system("unzip", file_name) | |
| completed_files << file_name | |
| end |