This code has been moved to a GitHub repository with the corresponding license. https://github.com/UngarMax/TelnetServer
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
expr -l Swift -- import UIKit | |
expr -l Swift -- let $webview = unsafeBitCast(0x7b500026ca00, to: UIWebView.self) | |
expr -l Swift -- print($webview.request.url) |
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
static NSData *PSPDFCalculateSHA256FromFileURL(NSURL *fileURL, CC_LONG dataLength, NSError **error) { | |
NSCParameterAssert(fileURL); | |
dispatch_queue_t shaQueue = dispatch_queue_create("com.pspdfkit.sha256-queue", DISPATCH_QUEUE_SERIAL); | |
__block dispatch_io_t readChannel; | |
void (^processIntError)(int intError) = ^(int intError) { | |
if (intError != 0) { | |
PSPDFLogWarning(@"Stream error: %d", intError); | |
if (error) *error = [NSError errorWithDomain:@"SHA256Error" code:100 userInfo:@{NSLocalizedDescriptionKey: @"failed to open file for calculating SHA256."}]; |
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
# don't treat any of these as errors, warnings or info | |
ok /setenv / | |
# ignore TidyXML warnings | |
ok /line [0-9]+ column [0-9]+ - Error:/ | |
ok /line [0-9]+ column [0-9]+ - Warning:/ | |
ok /[0-9]+ warning.+ error.+ found!/ | |
# ignore weird warnings about build variables in Info.plist: | |
# e.g. "warning: ignoring operator ':rfc1034Identifier' on 'RSWebClientCore' for macro 'PRODUCT_NAME'" |
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
Find: ^([+-] \(.* \*\))( ) | |
Replace: \1 |
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
// | |
// BaseViewController.m | |
// | |
// Created by Peter Boctor on 5/4/11. | |
// | |
// Copyright (c) 2011 Peter Boctor | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |
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
indent_align_string=false | |
indent_braces=false | |
indent_braces_no_func=false | |
indent_brace_parent=false | |
indent_namespace=false | |
indent_extern=false | |
indent_class=false | |
indent_class_colon=false | |
indent_else_if=false | |
indent_func_call_param=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
if RUBY_ENGINE == 'macruby' | |
framework 'CoreServices' | |
WATCHED_EXTS = "rb,builder,erb,nokogiri" | |
PASSENGER_RESTART_FILE = File.expand_path(File.join(File.dirname(__FILE__), "..", "tmp", "restart.txt")) | |
DELAY = 3 | |
def modified_files(path) | |
Dir.glob("#{File.expand_path(path)}/*.{#{WATCHED_EXTS}}").map do |filename| | |
begin |
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
cd "$DATABASE_LOCATION" | |
echo '.dump'|sqlite3 $DB_NAME|sqlite3 repaired_$DB_NAME | |
mv $DB_NAME corrupt_$DB_NAME | |
mv repaired_$DB_NAME $DB_NAME |