The default color for active tab on Terminator and Ubuntu terminal
is almost indistinguishable.
This can be fixed by using another theme,
but if you want to use your current theme and only tweak the tab color,
read on.
Because Terminator 0.97 still uses GTK2;
whereas Ubuntu terminal uses GTK3,
they each require a different method to tweak.
The Tweak for GTK2
For Terminator and any other GTK2 applications,
you can directly edit the gtkrc file your theme uses.
1
sudo vim /usr/share/themes/<YOUR_THEME>/gtk-2.0/gtkrc
Replace @bg_color in bg[NORMAL] to a color you like,
e.g. #FCBC8D.
The Tweak for GTK3
For terminal and any other GTK3 applications,
you can edit the gtk.css in your home directory.
It is located in #HOME/.config/gtk-3.0/gtk.css.
Create one if it’s not there.
The default Theos installation, as outlined in
this wiki,
does not include all iOS headers.
The following process installs the necessary headers and patches for OSX Mountain Lion/Mavericks.
/* This call lets you get an xpc_object_t that holds a reference to the IOSurface.
Note: Any live XPC objects created from an IOSurfaceRef implicity increase the IOSurface's global use
count by one until the object is destroyed. */
//xpc_object_t IOSurfaceCreateXPCObject(IOSurfaceRef aSurface)
// IOSFC_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
/* This call lets you take an xpc_object_t created via IOSurfaceCreatePort() and recreate an IOSurfaceRef from it. */
IOSurfaceRef IOSurfaceLookupFromXPCObject(xpc_object_t xobj)
IOSFC_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_NA);
It seems all the tutorial on Octopress deals with setting up a new repository.
Recently, I needed to clone the my Octopress repo on a new machine and
resume writing there. I thought it would be as simple as
git clone, rake setup_github_pages, rake new_post, and rake gen_deploy.
However I encourtered the following during deploy
12345678910
To https://github.com/username/username.github.io
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/username/username.github.io'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
## Github Pages deploy complete
cd -
The Fix
I googled around and found no solution.
After digging into the Rakefile, I came up with a manual fix.
Basically, you need to create and link the deploy directory to master branch.
First, we clone the repo and switch to the correct branch:
123
git clone https://github.com/username/username.github.io.git
cd username.github.io.git
git checkout source
Since China uses a different coordinate system,
the common latitude/longitude coordinates obtained from GPS or iOS CoreLocation service
will not map to the correct location in China.
The shift is usually 500+ meters, which renders the FindMyFriends app useless.
In order to let your (unjailbroken) friends see your true location,
your reported location need to be shifted.
When they receive your (shifted) location and apply it to a shifted map,
the shift effect cancels out and they see your true location in MapView.
FindMyFriends.app reports user location from two places.
When the app is in foreground, the app itself reports the location.
When the app is in background, aosnotifyd daemon will respond to the location request.
(This daemon is also responsible for FindMyiPhone.app location tracking.)
Therefore to fix the location shift, those two places need to be patched.
com.apple.mobileme.fmf1
In FindMyFriends.app, the following function does the reporting:
ServerInteractionController.h:
1
-(void)sendMyLocation:(id)location;
Using theos, we can hook into the method and modify the (id)location.
However, we can fix friends location altogether by hooking the location data
structure directly.
For some reason, I will not discuss the detail of the shift function transform().
Basically it does the conversion from WGS-84(GPS) to GCJ-02 coordinates.
Google WGS2GCJ for more information.