Skip to content

Instantly share code, notes, and snippets.

View xandrucea's full-sized avatar

Alex Cio xandrucea

View GitHub Profile
@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
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 / 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
@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

function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
//
// TumblrCheckViewController.m
// TumblrCheck
//
// Created by Alexandru Ciocea on 11.04.13.
// Copyright (c) 2013 ImprovingSkills. All rights reserved.
//
#define kAsyncModus dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)
#define kTumblURL [NSURL URLWithString: @"http://trainbrainstorm.tumblr.com/api/read/json"]
#define kAnotherURL [NSURL URLWithString: @"http://api.kivaws.org/v1/loans/search.json?status=fundraising"]
@xandrucea
xandrucea / Apple Sample Projects
Last active December 16, 2015 05:59
Explanation about content of downloaded sample projects from apple
Advanced Sample Project
------------------------------
https://developer.apple.com/library/ios/#samplecode/AdvancedTableViewCells/Introduction/Intro.html#//apple_ref/doc/uid/DTS40009111
AdvancedTableViewCells includes three different cells that all display content in the same form as the App Store application. One uses individual subviews (image views, labels, etc.) to display the content. Another uses a single view that draws all of the content. A third uses a single view to draw most of the content and separate views for the remainder.
International Mountains
------------------------------
@xandrucea
xandrucea / gist:5635627
Created May 23, 2013 12:10
Creating delegates
In Klasse die das delegate erhalten soll:
@protocol CustomAlertDelegate <NSObject>
-(void)dismissMyViewController:(UIViewController *)aViewController;
@end
define the delegate property:
@xandrucea
xandrucea / Device identification
Last active December 18, 2015 15:19
Device identification
check if device is jailbraiked
(Not all users have installed Cydia, maybe check any root dir outside the sandbox -->/bin/usr)
------------------------------
NSString *filePath = @"/Applications/Cydia.app";
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath])
{
// do something useful
}
@xandrucea
xandrucea / View Snippets
Last active December 18, 2015 15:19
UIView Snippets
int count = 0;
for(UIView *v in [actualView subviews]){
if([v isMemberOfClass:[UIView class]]){
NSLog(@"Aktual View %d: %@", count, v);
count++;
}
}
- (void)printMyFrame:(CGRect)aFrame{