Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #import <RestKit/RestKit.h> | |
| #import "CoreData+MagicalRecord.h" | |
| // Use a class extension to expose access to MagicalRecord's private setter methods | |
| @interface NSManagedObjectContext () | |
| + (void)MR_setRootSavingContext:(NSManagedObjectContext *)context; | |
| + (void)MR_setDefaultContext:(NSManagedObjectContext *)moc; | |
| @end | |
| @implementation AppDelegate |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000I was chasing down another issue (slow "Save As") and thought these two issues may have been related (with QuickLook being the common broken link). Unfortunately, my "Save As" dialog is still miserably slow on the initial load; but IconServicesAgent hasn't gone above 30MB and he rarely makes an appearance in the Console!
Some of these steps may not be necessary, but here are all of the steps I took that inadverdently put IconServicesAgent back in its place. Note: all commands are a single-line, if they appear to be multiple that's just the forum formatting.
Check for any QuickLooks related .plist files. In a terminal: mdfind com.apple.quicklook. -name .plist
I only had files at the system level (specifically within /System/Library/LaunchAgents/). If you have others, modify the directions below to take that into account (re-introducing plist files from the system level back up to the user).
Make some temporary directories to store these plist files, just in case: mkdir ~/tmp-quicklook
| require "net/https" | |
| require "uri" | |
| require 'json' | |
| uri = URI.parse("https://www.howsmyssl.com/a/check") | |
| http = Net::HTTP.new(uri.host, uri.port) | |
| http.use_ssl = true | |
| resp = JSON.parse(http.request(Net::HTTP::Get.new(uri.request_uri)).body) | |
| puts JSON.pretty_generate(resp) |
| /** @jsx React.DOM */ | |
| var LopMonHoc = React.createClass({ | |
| getInitialState: function(){ | |
| return {data: []} | |
| }, | |
| loadData: function(){ | |
| $.ajax({ | |
| url: '/daotao/lops', | |
| success: function(data){ |
| hfm@giant [~/program/test-serf] [perl v5.21.2] [ruby 2.2.0preview1] [python 2.7.8] | |
| $ puppet --version | |
| /Users/hfm/.rbenv/versions/2.2.0-preview1/lib/ruby/gems/2.2.0/gems/puppet-3.7.1/lib/puppet/vendor/safe_yaml/lib/safe_yaml/syck_node_monkeypatch.rb:42:in `<top (required)>': uninitialized constant Syck (NameError) | |
| from /Users/hfm/.rbenv/versions/2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' | |
| from /Users/hfm/.rbenv/versions/2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' | |
| from /Users/hfm/.rbenv/versions/2.2.0-preview1/lib/ruby/gems/2.2.0/gems/puppet-3.7.1/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:197:in `<module:YAML>' | |
| from /Users/hfm/.rbenv/versions/2.2.0-preview1/lib/ruby/gems/2.2.0/gems/puppet-3.7.1/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb:132:in `<top (required)>' | |
| from /Users/hfm/.rbenv/versions/2.2.0-preview1/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' | |
| from /Users/hfm/.rbenv/versions/2.2.0-preview1/lib/r |
| llvm[6]: ======= Finished Linking Release+Asserts Unit test ClangApplyReplacementsTests (without symbols) | |
| llvm[6]: Compiling UniqueHeaderNameTest.cpp for Release+Asserts build | |
| if clang++ -I/private/tmp/llvm35-g2huGt/llvm-3.5.1.src/include -I/private/tmp/llvm35-g2huGt/llvm-3.5.1.src/tools/clang/tools/extra/unittests/clang-modernize -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/private/tmp/llvm35-g2huGt/llvm-3.5.1.src/tools/clang/tools/extra/unittests/clang-modernize/../../../../include -I/private/tmp/llvm35-g2huGt/llvm-3.5.1.src/tools/clang/tools/extra/unittests/clang-modernize/../../../../include -I/private/tmp/llvm35-g2huGt/llvm-3.5.1.src/tools/clang/tools/extra/unittests/clang-modernize/../../clang-modernize -I/private/tmp/llvm35-g2huGt/llvm-3.5.1.src/tools/clang/tools/extra/unittests/clang-modernize/../../clang-apply-replacements/include -I/private/tmp/llvm35-g2huGt/llvm-3.5.1.src/tools/clang/tools/extra/unittests/clang-modernize/../include -I/private/tmp |
| // Content source: https://medium.com/@oleavr/diy-kernel-panic-os-x-and-ios-in-10-loc-c250d9649159 | |
| // HN thread: https://news.ycombinator.com/item?id=9085536 | |
| #include <unistd.h> | |
| #include <mach/mach.h> | |
| #include <mach-o/dyld.h> | |
| extern kern_return_t mach_vm_protect(vm_map_t, mach_vm_address_t, mach_vm_size_t, | |
| boolean_t, vm_prot_t); |
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }