My general thumb of rule to download a new tool is to wait until I Google a tool to solve a problem, and then integrate it into my workflow. So download the tools which you think are useful to your workflow.
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH i
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
#!/usr/bin/env osascript -l JavaScript | |
var numDaysToKeep = 20; | |
var now = $.NSDate.date; | |
console.log("Now:", now.description.js); | |
var deleteThreshold = now.dateByAddingTimeInterval(-86400 * numDaysToKeep); | |
console.log("Will delete items whose date added is earlier than", deleteThreshold.description.js); | |
var urlPath = $.NSURL.alloc.initFileURLWithPathIsDirectory($('~/.Trash').stringByExpandingTildeInPath, true); | |
var fm = $.NSFileManager.defaultManager; | |
var urlContents = fm.contentsOfDirectoryAtURLIncludingPropertiesForKeysOptionsError(urlPath, ["NSURLAddedToDirectoryDateKey"], $.NSDirectoryEnumerationSkipsHiddenFiles, null).js; |
To use this bot:
- Download
ads_bot.py
andrequirements.txt
. - Type
pip install -r requirements.txt
to install the requirements. - Fill out the required information in the Python file.
- Ideally, create a (free) Slack account and set up a web hook to receive notifications from the bot.
- Run the script :)
- Relax and be ready to answer incoming calls :D
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
BOOL MTDIsBoldTextEnabled(void) { | |
static BOOL boldTextEnabled = NO; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
// Hack that checks if the "bold text" flag in the accessibility settings is enabled | |
UIFont *font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; | |
boldTextEnabled = [font.fontName rangeOfString:@"MediumP4"].location != NSNotFound; | |
}); |
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
/** | |
Provides the ability to verify key paths at compile time. | |
If "keyPath" does not exist, a compile-time error will be generated. | |
Example: | |
// Verifies "isFinished" exists on "operation". | |
NSString *key = SQKeyPath(operation, isFinished); | |
// Verifies "isFinished" exists on self. |
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
// | |
// SDMacros.h | |
// | |
// Created by Brandon Sneed on 7/11/13. | |
// Copyright (c) 2013 SetDirection. All rights reserved. | |
// | |
// | |
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
// Version 2, December 2004 | |
// |
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
#import <Foundation/Foundation.h> | |
@interface NSArray (SafeAccess) | |
- (instancetype)withoutNulls; | |
- (instancetype)arrayByRemovingObjectsOfClass:(id)obj; | |
- (id)objectAtIndex:(NSUInteger)index ifKindOf:(Class)kind; | |
- (id)objectAtIndex:(NSUInteger)index ifKindOf:(Class)kind defaultValue:(id)defaultValue; |
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
import os.path as path | |
import string | |
import argparse | |
import glob | |
import re | |
def basename(filename): | |
base = filename | |
if filename.find('@2x') > 0: | |
base = filename[:filename.find('@2x')] |
NewerOlder