Skip to content

Instantly share code, notes, and snippets.

View matux's full-sized avatar
💭
To call each thing by its right name.

Matias Pequeno matux

💭
To call each thing by its right name.
View GitHub Profile
@matux
matux / config.log
Created August 7, 2013 03:16
Logs/Homebrew/gource/config.log > brew install gource
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Gource configure 0.40, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gource/0.40 --disable-sdltest --without-x --disable-freetypetest
## --------- ##
## Platform. ##
@matux
matux / gist:6170890
Created August 7, 2013 03:17
brew install gource --verbose terminal output
==> Downloading http://gource.googlecode.com/files/gource-0.40.tar.gz
Already downloaded: /Library/Caches/Homebrew/gource-0.40.tar.gz
tar xf /Library/Caches/Homebrew/gource-0.40.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gource/0.40 --disable-sdltest --without-x --disable-freetypetest
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gource/0.40 --disable-sdltest --without-x --disable-freetypetest
configure: WARNING: unrecognized options: --disable-sdltest, --disable-freetypetest
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
@matux
matux / gist:6170893
Created August 7, 2013 03:18
brew doctor output > brew doctor
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libGeoIP.1.dylib
/usr/local/lib/libGeoIPUpdate.0.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
@matux
matux / console
Created August 31, 2013 03:02
Notifications issue
08-30 23:56:41.608: I/ActivityThread(14196): Pub com.weheartit.content.WHISearchRecentSuggestionsProvider: com.weheartit.content.WHISearchRecentSuggestionsProvider
08-30 23:56:41.765: D/NotificationAlarmService(14196): service starting
08-30 23:56:41.765: D/NotificationAlarmService(14196): handleIntent
08-30 23:56:41.804: D/Utils(14196): Runtime.getRuntime().maxMemory(): 98304kb
08-30 23:56:41.804: D/Utils(14196): Initializing LruCache with size 12288kb
08-30 23:56:41.905: D/WhiSharedPreferences(14196): gotUser with id 8553279
08-30 23:56:41.905: D/WhiSession(14196): setCurrentUser with id 8553279 and username MatuX
08-30 23:56:41.905: D/WhiSharedPreferences(14196): storeUser with id 8553279
08-30 23:56:41.913: D/ApiRequest(14196): getUnreadNotificationsCount() with fbff5dc39a27bdf21ddbb91a358306e23c136755033b679bd827a1716b05a4e2
08-30 23:56:41.913: I/HttpClient(14196): get(url: https://api.weheartit.com/api/notifications/unread)
@matux
matux / gist:7236710
Last active December 27, 2015 00:19
Before
total 56
-rw-r--r-- 1 matux staff 0 Oct 29 22:31 1.7
-rw-r--r-- 1 matux staff 15994 Oct 29 22:50 browser.plist
-rw-r--r--@ 1 matux staff 1150 Oct 29 23:00 hgrc_sourcetree
-rw-r--r-- 1 matux staff 566 Oct 29 22:34 hostingservices.plist
-rw-r--r-- 1 matux staff 440 Oct 29 22:50 openWindowList
After
- final float wd = w - d.getIntrinsicWidth();
- final float wdDiv2 = wd / 2;
+ final float wd = (getWidth() / 2) - (w / 2);
final RectF r1 = new RectF(0, offset, d.getIntrinsicWidth(), d.getIntrinsicHeight());
- final RectF r2 = new RectF(-wdDiv2, 0, d.getIntrinsicWidth() + wdDiv2, getHeight());
+ final RectF r2 = new RectF(wd, 0, getWidth() - wd, getHeight());
- final float offset = 0; // d.getIntrinsicHeight() * coverImageModel.getViewport().top;
- final float y = d.getIntrinsicHeight() - offset;
- final float e = getHeight();
- final float scale = e / y;
+ final float scaleH = getHeight() / d.getIntrinsicHeight();
+ final float scaleW = getWidth() / d.getIntrinsicWidth();
- final float w = d.getIntrinsicWidth() * scale;
- final float wd = w - d.getIntrinsicWidth();
- final float wdDiv2 = wd / 2;
eyJhbGciOiJSUzI1NiIsImtpZCI6ImM4MTE0ODQyYTM4NzhhOTg1YTNhNDczMTgzOWU5NThkNWY2NDk5MDEifQ.eyJpc3MiOiJhY2NvdW50cy5nb29nbGUuY29tIiwiYXVkIjoiOTIxNDkzNDc4NDkxLTY3MGJhY3Zjb2xqNHRjc2ptcTc1Zm5kOXEydXVscnBwLmFwcHMuZ29vZ2xldXNlcmNvbnRlbnQuY29tIiwiZW1haWwiOiJtYXRpYXNAd2VoZWFydGl0LmNvbSIsImNpZCI6IjkyMTQ5MzQ3ODQ5MS1rN2V2bzFlNWZhdXNtYTJjcWJydnQzMmg5dXY2NHFtOC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsImF6cCI6IjkyMTQ5MzQ3ODQ5MS1rN2V2bzFlNWZhdXNtYTJjcWJydnQzMmg5dXY2NHFtOC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsInZlcmlmaWVkX2VtYWlsIjoidHJ1ZSIsImVtYWlsX3ZlcmlmaWVkIjoidHJ1ZSIsImlkIjoiMTEwMDYzNjEwMjQ3MDU2MzY0NzAyIiwic3ViIjoiMTEwMDYzNjEwMjQ3MDU2MzY0NzAyIiwiaGQiOiJ3ZWhlYXJ0aXQuY29tIiwiaWF0IjoxMzg1NDE4MTM3LCJleHAiOjEzODU0MjIwMzd9.pSRfmolIUz0m_PPw_fSHqL4IU8MFnO-xTlIkVuKKTo-vkjzeGtPFIrTv2g6zD-9Yf5b8h6z-P1l3GiP10yeWtRoTXbKpNnnGQvMt8hwVmXn5u_QETHwLmdWB7HflPjJ2J4Roo6B3rGGbkkZpFdsdhDQayrJ0PV1uUVmwh6OZMis
oauth2:server:client_id:921493478491-670bacvcolj4tcsjmq75fnd9q2uulrpp.apps.googleusercontent.com:api_scope:https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/plus.me
SIDeviceModel SIRetrieveDeviceModel(void)
{
if( cachedDeviceModel == SIDM_UNKNOWN )
{
// Get the system platform name
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = @(machine);