-
"ibm850"
-
"ASCII"
-
"UTF-8"
-
"X-ISO-10646-UCS-4-3412"
-
"X-ISO-10646-UCS-4-2143"
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
#!/bin/bash | |
# configuration | |
#host1 is for metadata, host2 is for data | |
host1="api.dropbox.com" | |
host2="api-content.dropbox.com" | |
# usage | |
if [ "$*" == "" ]; then | |
echo "usage: $0 [restore|off|fast|medium|slow]" |
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
// This could be done using CALayer cornerRadius property | |
// This is an example of how would be done without that :-) | |
@interface UIImage (RoundedCorners) | |
- (UIImage *)roundedImageWithCornerRadius:(CGFloat)cornerRadius; | |
@end | |
@implementation UIImage (RoundedCorners) |
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
tell application "iPhone Simulator" | |
activate | |
end tell | |
tell application "System Events" | |
tell process "iPhone Simulator" | |
tell menu bar 1 | |
tell menu bar item "iOS Simulator" | |
tell menu "iOS Simulator" | |
click menu item "Reset Content and Settings…" |
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
NSFont *normalFont = [NSFont systemFontOfSize:12]; | |
CGRect renderFrame = CGRectMake(0, 0, 300, 50); // box to render the text into | |
static NSLayoutManager *layMan = nil; | |
if (!layMan) { | |
layMan = [NSLayoutManager new]; | |
} | |
CGFloat lineHeight = [layMan defaultLineHeightForFont:normalFont]; // calculate the expected height of a line | |
NSDictionary *attrDict = [NSDictionary dictionaryWithObject:normalFont andKey:NSFontAttributeName]; |
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
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.2 (140) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
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
# | |
# uncrustify config file for objective-c and objective-c++ | |
# | |
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs | |
output_tab_size = 4 # new tab size | |
indent_columns = output_tab_size | |
indent_label = 2 # pos: absolute col, neg: relative column | |
indent_align_assign = FALSE |
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
// | |
// Punycode.swift | |
// | |
// Created by Mike Kasianowicz on 9/7/15. | |
// Copyright © 2015 Mike Kasianowicz. All rights reserved. | |
// | |
import Foundation | |
public class Punycode { |
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
Open command prompt (Terminal) and run: | |
ffmpeg -i "filename.flv" -vcodec copy -acodec copy "filename.mp4" | |
This will copy video track and audio track from filename.flv to filename.mp4. The operation is lossless (there is no quality loss). |
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 | |
import Dispatch | |
// Special queue for flushing the logs | |
private let loggingQueue = DispatchQueue(label: "com.logging.queue", qos: .utility) | |
// The application-wide logger object | |
public var logger: Logger = GlobalLogger.global | |
// A global logger which flushes data using the loggingQueue |
OlderNewer