Skip to content

Instantly share code, notes, and snippets.

View sebastienwindal's full-sized avatar

Sebastien Windal sebastienwindal

View GitHub Profile
@sebastienwindal
sebastienwindal / gist:ab02e7dffee942f016194cf08b39ec56
Created February 9, 2017 00:22
find biggest image assets in your iOS app...
du -ah | egrep -v "AppStore|DerivedData|Pods|Frameworks" | egrep -i "PNG|jp(e?)g" | sort -n -r | more
@sebastienwindal
sebastienwindal / .block
Last active February 24, 2016 16:40 — forked from mbostock/.block
Calendar View
license: gpl-3.0
height: 910
border: no
@sebastienwindal
sebastienwindal / NSFetchedResultsControllerDelegate
Last active December 31, 2015 15:19
NSFetchedResultsControllerDelegate implementation quick copy and paste.
#pragma mark NSFetchedResultsControllerDelegate
-(void) controllerWillChangeContent:(NSFetchedResultsController *)controller
{
[self.tableView beginUpdates];
}
-(void) controllerDidChangeContent:(NSFetchedResultsController *)controller
{
[self.tableView endUpdates];
<div class="button" role="button">Login</div>
<i class="icon-spinner icon-spin" ng-show="requestPending"></i>
function SomeController($scope, $location, roster, classSection)
{
$scope.requestPending = false;
$scope.errorMessage = "";
$(function() {
$scope.requestPending = true;
$scope.errorMessage = "";
});
}
function SomeController($scope, etc..) {
$(function() {
$scope.requestPending = true;
$scope.errorMessage = "";
(...)
});
#myAnimatedText {
background-color: red;
-webkit-transition-property: background-color;
-webkit-transition-duration: 1.0s;
}
#myAnimatedText:hover {
background-color: blue;
}
/* style 1 */
#myText {
background-color: red;
}
/* style 2 */
#myText:hover {
background-color: blue;
}
+(void) DoNotUseNSLog_It:(NSString *)format, ...
{
// call AMPDebug or whatever...
AMPDebug(blah blah
}
+(void) DoNotUseNSLog_It:(NSString *)format, ... __attribute__ ((deprecated));
#define NSLog(s, ...) [YourLogginClass DoNotUseNSLog_It:(s, ##__VA_ARGS__)];