-- Poor Websites --
http://www.theworldsworstwebsiteever.com/
-- Useless Websites --
# Source: https://gist.github.com/izackp/967c059abe102745f61d | |
# Thumbnails | |
._* | |
# Files that might appear on external disk | |
.Spotlight-V100 | |
.Trashes | |
# Directories potentially created on remote AFP share |
float x = 5.0f; | |
float y = 5.0f; | |
float destX = 25.0f; | |
float destY = 30.0f; | |
float diffX = abs(destX - x); | |
float diffY = abs(destY - y); | |
float scale = 0.0f; |
dir=$(pwd) | |
find "$dir" -name "*@2x.png" | while read image; do | |
outfile=$(dirname "$image")/$(basename "$image" @2x.png).png | |
if [ "$image" -nt "$outfile" ]; then | |
basename "$outfile" | |
width=$(sips -g "pixelWidth" "$image" | awk 'FNR>1 {print $2}') | |
height=$(sips -g "pixelHeight" "$image" | awk 'FNR>1 {print $2}') |
h = sqrt(a² + b²); | |
//All these assume 0 ≤ a ≤ b. | |
h = ((sqrt(2) - 1) * a) + b; //Max Error: 8.24% over true value, b must the be larger number | |
h = 0.414213562 * a + b; //Same as above. Either works compiler will optimize. | |
h = 4142 * a / 10000 + b; //Same as above. We just only use ints | |
h = (a >> 1) + b; //Max Error: a/2 //Simplified version of above to be faster and less accurate | |
h = b + 0.337 * a // max error ≈ 5.5 % |
//Brandon Levasseur | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
source = dispatch_source_create(DISPATCH_SOURCE_TYPE_SIGNAL, SIGSTOP, 0, queue); | |
if (source) { | |
dispatch_source_set_event_handler(source, ^{ | |
NSLog(@"Hi, I am: %@", weakSelf); | |
}); | |
dispatch_resume(source); |
@interface NSString (Formatting) | |
- (NSString*)stringWithOnlyLetters; | |
- (NSString*)stringWithOnlyNumbers; | |
@end |
# Xcode | |
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 | |
!default.mode2v3 | |
*.perspectivev3 | |
!default.perspectivev3 | |
*.xcworkspace |
#import <UIKit/UIKit.h> | |
@interface Widget : UIView | |
@property (strong, nonatomic, readonly) IBOutlet UIView* view; | |
@end |
source ~/.bash_profile | |
hash oclint &> /dev/null | |
if [ $? -eq 1 ]; then | |
echo >&2 "oclint not found, analyzing stopped" | |
exit 1 | |
fi |
-- Poor Websites --
http://www.theworldsworstwebsiteever.com/
-- Useless Websites --