Skip to content

Instantly share code, notes, and snippets.

View mgcrea's full-sized avatar
🚀
Norminal

Olivier Louvignes mgcrea

🚀
Norminal
  • Freelance
  • Paris, France
View GitHub Profile
@mgcrea
mgcrea / gist:2780524
Created May 24, 2012 09:52
li3 logQueries
public static function __init() {
parent::__init();
static::applyFilter('find', function($self, $params, $chain){
Logger::info(json_encode(array('Model::find()' => $params)));
return $chain->next($self, $params, $chain);
$admins = Users::all(array('conditions' => array('email' => array('$in' => array('a@gmail.com', 'b@gmail.com'))), 'fields' => array('_id', 'email', 'isAdmin')));
d($admins->data());
$admins->each(function($admin) {
$admin->isAdmin = true;
$admin->save();
});
dd($admins->data());
UIBezierPath *buttonPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds cornerRadius:self.layer.cornerRadius];
CAShapeLayer* shadowLayer = [CAShapeLayer layer];
//shadowLayer.cornerRadius = 8.0f;
[shadowLayer setOpacity:1];
[shadowLayer setBackgroundColor:UIColor.redColor.CGColor];
// Standard shadow stuff
[shadowLayer setShadowOpacity:1.0f];
[shadowLayer setShadowColor:[[UIColor colorWithWhite:1 alpha:1] CGColor]];
.directive('uiPopover', ['$compile', '$http', function($compile, $http) {
return {
restrict: 'A',
scope: {
hide: '&hide' // did not understand what is this
},
link: function postLink(scope, element, attr, ctrl) {
console.warn('postLink', arguments, this);
// scope is the anchor scope
@mgcrea
mgcrea / gist:3722374
Created September 14, 2012 14:50
android target
Available Android targets:
----------
id: 1 or "android-7"
Name: Android 2.1
Type: Platform
API level: 7
Revision: 3
Skins: HVGA, QVGA, WQVGA400, WQVGA432, WVGA800 (default), WVGA854
ABIs : armeabi
----------
29/03/2010-16:24:00;4372386.99875
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/opt/local/bin/npm', 'install', 'express' ]
2 info using npm@1.2.28
3 info using node@v0.10.10
4 verbose read json /Users/olivier/package.json
5 verbose read json /Users/olivier/node_modules/express/package.json
6 verbose read json /Users/olivier/node_modules/grunt/package.json
7 verbose read json /Users/olivier/node_modules/jasmine-node/package.json
8 verbose read json /Users/olivier/node_modules/karma/package.json
9 verbose read json /Users/olivier/node_modules/nodeunit/package.json
@mgcrea
mgcrea / gist:5912036
Created July 2, 2013 18:57
npm list --json --global
{
"problems": [
"invalid: async@0.1.22 /usr/lib/node_modules/bower/node_modules/async",
"invalid: watch@0.5.1 /usr/lib/node_modules/forever/node_modules/watch"
],
"dependencies": {
"bower": {
"version": "0.9.2",
"from": "bower@",
"problems": [

Keybase proof

I hereby claim:

  • I am mgcrea on github.
  • I am olouvignes (https://keybase.io/olouvignes) on keybase.
  • I have a public key whose fingerprint is FEDD 0527 8938 C582 C135 5C64 EE5C E46C 36AC 3F2F

To claim this, I am signing this object:

12-12 16:59:56.719 1193 4173 D vendor.qti.bluetooth@1.0-wake_lock: Release wakelock is released
12-12 16:59:56.878 1041 1111 E netd : dispachCmd:oplusGetRtt
12-12 16:59:56.878 1041 1111 E netd : handleGetRttCmd: netId = 100, uid = 10381
12-12 16:59:56.879 1041 1111 E netd : dispachCmd cmd:oplusGetRtt result:2
12-12 16:59:56.881 3112 4101 D WifiStatusTracker: mNetworkCallback onCapabilitiesChanged network:100 mPrimaryNetworkId:100
12-12 16:59:56.883 3112 4101 D WifiStatusTracker: mNetworkCallback onCapabilitiesChanged network:100 mPrimaryNetworkId:100
12-12 16:59:56.886 5584 7249 D ONet:ONetWifiInfoManager: (ConnectivityManager.java:4280)onCapabilitiesChanged, frequency=2442
12-12 16:59:56.886 5584 7249 D ONet:ONetWifiInfoManager: (ONetWifiInfoManager.kt:13)onCapabilitiesChanged, channel=7
12-12 16:59:56.888 4202 10116 I ChimeraSrvcProxy: NullBinder for android.net.action.RECOMMEND_NETWORKS triggering remote TransactionTooLargeException due to Service without Chimera impl
12-12 16:5