Skip to content

Instantly share code, notes, and snippets.

View xandrucea's full-sized avatar

Alex Cio xandrucea

View GitHub Profile
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
@xandrucea
xandrucea / css_resources.md
Last active August 29, 2015 14:08 — forked from jookyboi/css_resources.md
CSS libraries and guides

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@xandrucea
xandrucea / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
make icon corner transparent
----------------------------
- select image
- Menü Auswahl -> Abgerundetes Rechteck... --> ~38 / 39
- invert selection CMD + I
- press delete
- export image CMD + E
Bilder beschneiden
@xandrucea
xandrucea / pi
Last active August 29, 2015 14:00
TO SOLVE
--------
:80 already in use. change from tomcat to apache
pi itself
---------
cat [filename]
print file
cat [filename] | less
Create ActionSheet for iOS 7 and iOS 8
--------------------------------------
// if( [[UIDevice currentDevice] systemVersion].doubleValue < 8.0 ){
UIActionSheet *actionSheet = [UIActionSheet new];
[actionSheet setTitle:prodAdFree.localizedTitle];
[actionSheet setDelegate:self];
[actionSheet setCancelButtonIndex:2];
[actionSheet addButtonWithTitle:NSLocalizedString(@"Produkt kaufen", @"")];
[actionSheet addButtonWithTitle:NSLocalizedString(@"Produkt wiederherstellen", @"")];
[actionSheet addButtonWithTitle:NSLocalizedString(@"Abbrechen", @"")];
/*
* System Versioning Preprocessor Macros
*/
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
format UIDatePicker if labels background white
----------------------------------------------
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss zzzzz"];
NSString *stringyDate = @"2014-06-02 10:10:00 +0000";
NSDate *helperDate = [dateFormatter dateFromString:stringyDate];
datePickerDueDate.date = helperDate;
don't resize screen on TabBarController/TableView....
-----------------------------------------------------
if( [self respondsToSelector:@selector(edgesForExtendedLayout)] ) {
self.edgesForExtendedLayout = UIRectEdgeNone;
}
turn off header
---------------
1. General --> Deployment Info --> Status Bar Style, select "Hide during application launch"
2. Info --> View controller-based status bar appearance --> NO
Can't find references -L /../../../
-----------------------------------
Build Settings --> search for 'search'
check:
- Framework Search Paths
- Header Search Paths
- Library Search Paths