Skip to content

Instantly share code, notes, and snippets.

View Shosta's full-sized avatar
🧗
Furiously hacking

Rémi Lavedrine Shosta

🧗
Furiously hacking
View GitHub Profile
@Shosta
Shosta / OLGradientView.h
Created August 7, 2013 14:49
Allow the developer to set a custom color or gradient to a GRoupedTableViewCell by using the [UISelectedTableViewCell configureSelectedBackgroundForCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath forRowCount:(int)rowCount]; It is useful prior to iOS7 as there is no more GroupedTableViewCell on iOS7. Moreover the developer can s…
//
// OLGradientView.h
//
//
// Created by Rémi LAVEDRINE on 5/6/09.
// Copyright Rémi LAVEDRINE 2009. All rights reserved.
//
#import <UIKit/UIKit.h>
@Shosta
Shosta / NSString+LabelSize.h
Created August 7, 2013 14:54
Calculate a Label size based on its content and a width. It is really useful when you wants to calculate a cell's height from its NSString label's content.
//--------------------------------------------------------
//
//--------------------------------------------------------
// Project :
// File : NSString+LabelSize.h
// Created : $ 11/06/12 $
// Maintainer : $ Rémi LAVEDRINE $
//
// Copyright Rémi LAVEDRINE 2004-2012, All Rights Reserved
//
@Shosta
Shosta / UILabel+Size.h
Last active December 20, 2015 18:19
Calculate a Label Size from its content and its position. It is useful when you want to adapt a UILabel size according to its x;y origin, its width and its content. It can then adapt a cell's height from a dynamic content.
//--------------------------------------------------------
//
//--------------------------------------------------------
// Project :
// File : UILabel+Size.h
// Created : $ 04/05/12 $
// Maintainer : $ Rémi LAVEDRINE $
//
// Copyright Rémi LAVEDRINE 2004-2012, All Rights Reserved
//
@Shosta
Shosta / UIDevice-Hardware.h
Last active December 20, 2015 18:18
Allow the developer to know on which harware the program runs (iPhone4, iPhone4S, iPhone5, etc...).
/*
Erica Sadun, http://ericasadun.com
iPhone Developer's Cookbook, 5.0 Edition
BSD License, Use at your own risk
*/
#import <UIKit/UIKit.h>
#define IFPGA_NAMESTRING @"iFPGA"
@Shosta
Shosta / UIView+Rotation.h
Last active December 20, 2015 18:18
Allow the developer to rotate View during a predefined time or start an infinite rotation and stop it.
//--------------------------------------------------------
//
//--------------------------------------------------------
// Project :
// File : UIView+Rotation.h
// Created : $ 23/05/12 $
// Maintainer : $ Rémi LAVEDRINE $
//
// Copyright Rémi LAVEDRINE 2004-2012, All Rights Reserved
//
@Shosta
Shosta / gist:6608899
Created September 18, 2013 13:07
Code to add on viewDidLoad to handle the new Window and View management from iOS6 to iOS7 for your TableView.
#pragma mark - View
#define STATUS_BAR_HEIGHT [UIApplication sharedApplication].statusBarFrame.size.height
#define NAVIGATION_BAR_HEIGHT self.navigationController.navigationBar.bounds.size.height
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
self.edgesForExtendedLayout = UIRectEdgeTop;
@Shosta
Shosta / NSString+EmailValidating.h
Created October 4, 2013 07:53
NSString category to test if a string is a valid e-mail address.
//
// NSString+EmailValidating.h
//
//
// Created by Rems on 11/12/12.
// Copyright (c) 2012 . All rights reserved.
//
#import <Foundation/Foundation.h>
@Shosta
Shosta / ControlExtensions.cs
Created July 29, 2014 08:59
Dismiss Keyboard from a Control in Windows Phone 8.1 - ClassExtensions
using System;
using System.Collections.Generic;
using System.Text;
using Windows.UI.Xaml.Controls;
namespace OTV.UI.Controls
{
/// <summary>
/// A Class Extensions that allows to dismiss the Keyboard from a Control.
/// Include the "OTV.UI.Controls" namespace in your class and then call the "LoseFocus" method :
@Shosta
Shosta / idb_install.sh
Last active March 10, 2023 16:21
Kali Linux: idb Install script: idb_install.sh
apt-get install cmake libqt4-dev git-core libimobiledevice-utils libplist-utils usbmuxd -y
curl -sSL https://get.rvm.io | bash -s stable --ruby
source /usr/local/rvm/scripts/rvm
rvm use 2.1
mkdir ~/iOS && cd ~/iOS
git clone --recursive https://github.com/dmayer/idb.git
cd idb
bundle install
echo "Type 'ruby gidb.rb' to use idb's graphical user interface"

Keybase proof

I hereby claim:

  • I am shosta on github.
  • I am shostarsson (https://keybase.io/shostarsson) on keybase.
  • I have a public key ASDZ8qtcleJudG0HPLi_VwpDoo970mX_V3ZtsNT8H0Sabgo

To claim this, I am signing this object: