Skip to content

Instantly share code, notes, and snippets.

View rafattouqir's full-sized avatar

MD Rafat Touqir rafattouqir

View GitHub Profile
@natelandau
natelandau / .bash_profile
Last active June 13, 2024 18:01
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
/* This Program set, start and stop hotspot in windows 7.*/
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int t=0;
void frame(void);
void main()
{
start0:
@gimenete
gimenete / UIView+ActivityIndicator.h
Created July 11, 2013 09:01
Show an activity indicator in any UIView. Example: [imageView showActivityIndicator]; Then hide it [imageView hideActivityIndicator];
#import <Foundation/Foundation.h>
@interface UIView (ActivityIndicator)
- (void)showActivityIndicator;
- (void)showActivityIndicatorWithStyle:(UIActivityIndicatorViewStyle)style;
- (void)hideActivityIndicator;
@end
@patelrohan
patelrohan / gist:4352890
Last active August 21, 2018 20:05
Put UISearchBar in Navigation Controller
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Literature";
if (searchText.length > 0) {
[searchBar setShowsCancelButton:YES];
searchBar.text = searchText;
[self searchLiteraturesWithName:searchText];
}
[self.navigationController.navigationBar setTintColor:[UIColor primaryBarColor]];
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active June 13, 2024 02:39
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@wontondon
wontondon / AssetDatabaseOpenHelper.java
Created October 8, 2011 03:12
Copy sqlite database from assets dir - Android
package com.javatarts.basketballgm.data;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
CIAdditionCompositing - Adds color components to achieve a brightening effect. This filter is typically used to add highlights and lens flare effects.
CIAffineClamp - Performs an affine transform on a source image and then clamps the pixels at the edge of the transformed image, extending them outwards. This filter performs similarly to the CIAffineTransform filter except that it produces an image with infinite extent. You can use this filter when you need to blur an image but you want to avoid a soft, black fringe along the edges.
CIAffineTile - Applies an affine transform to an image and then tiles the transformed image.
CIAffineTransform - Applies an affine transform to an image. You can scale, translate, or rotate the input image. You can also apply a combination of these operations.
CIAreaAverage - Calculates the average color for the specified area in an image, returning the result in a pixel.
CIAreaHistogram - Calculates a histogram for the specified area in an image, returning the result in a 1D image.