Skip to content

Instantly share code, notes, and snippets.

@xmen4u
xmen4u / gist:2cec8b8f1c22c60a69a1
Created February 17, 2015 21:32
warning: opencv dependency libtiff was built with a different C++ standard
sh-3.2# brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
gcc49
@xmen4u
xmen4u / gist:c3937d237b7655b74ef6
Created October 7, 2014 07:37
ble - ibeacon for tessel
var tessel = require('tessel');
var bleLib = require('ble-ble113a');
var bleadvertise = require('bleadvertise');
var uuid = "D8EE2A9F24176669F9508C97F10AAB5B"; // Apple's example UUID
var major = '01';
var minor = '10';
var iBeaconData = new Buffer(uuid+major+minor, 'hex'); // Create data Buffer
@xmen4u
xmen4u / autolayout_swift
Created September 20, 2014 14:17
Autolayout with views place on IB , especially custom views from XIB, that involve transformations
I've created a custom view for a component to be used in the app.
That component has been added via the IB to the main viewController, it should have gonne through several
transformations while using gesture recognizer. Everything worked well in the simulator, but not on the device.
Acted really werid.
After many hours of playing around I came to the realization it was a constraints problem, as removing Autolayout
caused everything to act well on the device.
So i tried removing constraints, adding, programmatically adding / changing. Nothing worked.
Eventually, i removed the view from IB and added it programmatically.
@xmen4u
xmen4u / gist:3397357
Created August 19, 2012 20:08
node.js + redis + socket.io + should work but doesn't (express's prefix bug?)
io.configure(function() {
io.set('authorization', function(handshakeData, callback) {
if (handshakeData.headers.cookie) {
req_cookie = cookie.parse(decodeURIComponent(handshakeData.headers.cookie));
req_session = parseSignedCookie(req_cookie['connect.sid'], SECRET);