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
| #!/bin/bash | |
| # Uninstalls a list of unwanted apps from an Android device via ADB. | |
| REMOVE_LIST=( | |
| "com.dti.att" # DTI | |
| "com.google.android.youtube" | |
| "com.google.android.videos" | |
| "com.bleacherreport.android.teamstream" |
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
| #!/bin/bash | |
| # ---------------------------------------------------------------- | |
| # MQTT Configuration values | |
| # Note: these values can either be defined in the environment, or | |
| # in the raspotify conf file (/etc/raspotify/conf on Raspberry Pi OS) | |
| # | |
| # - LIBRESPOT_MQTT_HOST: the MQTT broker host/ip where events should be published | |
| # - LIBRESPOT_MQTT_TOPIC: topic where events will be published | |
| # |
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
| // NOTE: filenames hardcoded! | |
| const got = require('got') | |
| const csv = require('csv') | |
| const fs = require('fs') | |
| async function fetchGoogleBookId(isbn) { | |
| const queryUrl = `https://www.googleapis.com/books/v1/volumes?q=isbn:${isbn}` | |
| const response = await got(queryUrl) | |
| const json = JSON.parse(response.body) |
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
| static EVILoggingCallback s_callback = nil; | |
| #pragma mark - | |
| void EVILog(EVILogLevel level, NSString *fmt, ...) | |
| { | |
| va_list ap; | |
| va_start(ap, fmt); | |
| if(s_callback) |
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
| - (void)start:(NSString *)queueItemId | |
| { | |
| // ... | |
| EVILog(EVILogLevelInfo, @"started playing %@", queueItemId); | |
| // ... | |
| } |
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
| @implementation AppDelegate | |
| - (void)applicationDidFinishLaunching:(NSNotification *)aNotification | |
| { | |
| // ... | |
| EVIRegisterLoggingCallback(^(EVILogLevel level, NSString *message) { | |
| NSLog(@"EVIStreamer (%@): %@", EVILogLevelString(level), message); | |
| }); | |
| // ... | |
| } |
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
| extern void EVILog(EVILogLevel level, NSString *fmt, ...); |
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
| typedef NS_OPTIONS(NSInteger, EVILogLevel) | |
| { | |
| EVILogLevelError, | |
| EVILogLevelWarning, | |
| EVILogLevelInfo, | |
| EVILogLevelDebug, | |
| }; | |
| typedef void(^EVILoggingCallback)(EVILogLevel level, NSString *message); |
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
| clang hi.c -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -o hi | |
| where -isysroot parameter is discovered with: | |
| xcrun --sdk macosx10.9 --show-sdk-path | |
| --sdk parameter possibilities: | |
| thaddeus@pegasus:~$ xcodebuild -showsdks | |
| OS X SDKs: |
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
| BTPactolaNotificationRequest *request = [[BTPactolaNotificationRequest alloc] init]; | |
| request.deviceIdentifier = @"123456"; | |
| request.title = @"My App" | |
| request.message = @"Something Happened!" | |
| [request sendRequest]; |
NewerOlder