Skip to content

Instantly share code, notes, and snippets.

View rafattouqir's full-sized avatar

MD Rafat Touqir rafattouqir

View GitHub Profile
@rafattouqir
rafattouqir / Galaxy Of Tutorial Torrents
Created May 15, 2016 07:42 — forked from iHassan/Galaxy Of Tutorial Torrents
Ultimate Galaxy Of Tutorial Torrents
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@rafattouqir
rafattouqir / gist:a59c30d8e127862a48e7da36e39623ca
Created November 1, 2016 11:03 — forked from rgcottrell/gist:5b876d9c5eea4c9e411c
An FM Synthesizer in Swift using AVAudioEngine
import AVFoundation
import Foundation
// The maximum number of audio buffers in flight. Setting to two allows one
// buffer to be played while the next is being written.
private let kInFlightAudioBuffers: Int = 2
// The number of audio samples per buffer. A lower value reduces latency for
// changes but requires more processing but increases the risk of being unable
// to fill the buffers in time. A setting of 1024 represents about 23ms of
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.
@rafattouqir
rafattouqir / git.css
Created May 25, 2017 07:12 — forked from neilgee/git.css
Git Command Line Reference - Notes and reminders on set up and commands
/*
* Set up your Git configuration
*/
git config --global user.email "you@yourdomain.com"
git config --global user.name "Your Name"
git config --global core.editor "nano"
extension CustomCollectionViewController: UICollectionViewDelegateFlowLayout {
fileprivate var sectionInsets: UIEdgeInsets { return .zero }
fileprivate var itemsPerRow: CGFloat { return 3 }
fileprivate var interitemSpace: CGFloat { return 10 }
func collectionView(_ collectionView: UICollectionView,
layout collectionViewLayout: UICollectionViewLayout,
sizeForItemAt indexPath: IndexPath) -> CGSize {
//
// NewViewController.m
// AlertButton
//
// Created by Rafat Touqir Rafsun on 2/14/19.
//
#import "NewViewController.h"
@rafattouqir
rafattouqir / SafeAreaTopAnchorSnippet.swift
Last active March 5, 2019 03:28
iOS 11 safe area layout guide backwards compatibility upto iOS 9
let safeAreaTopAnchor:NSLayoutYAxisAnchor?
if #available(iOS 11.0, *) {
safeAreaTopAnchor = contentView.safeAreaLayoutGuide.topAnchor
} else {
// Fallback on earlier versions
var parentViewController: UIViewController? {
var parentResponder: UIResponder? = self
while parentResponder != nil {
parentResponder = parentResponder!.next
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
if collectionView === self.topCollectionView{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "topCollectionViewCell", for: indexPath) as! TopCollectionViewCell
return cell
}else{
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "bottomCollectionViewCell", for: indexPath) as! BottomCollectionViewCell
return cell
}
@rafattouqir
rafattouqir / LoaderWithCancelView+PKHUBCustomView.swift
Created May 16, 2019 07:35
PKHUD custom loader with cancel button and action on cancel button click
class LoaderWithCancelView: UIView,PKHUDAnimating{
let progressView: PKHUDProgressView = {
let pkHUDPV = PKHUDProgressView()
pkHUDPV.translatesAutoresizingMaskIntoConstraints = false
return pkHUDPV
}()
let buttonCancel:UIButton = {
let button = UIButton()
button.setTitle("Cancel", for: .normal)
@rafattouqir
rafattouqir / .bash_profile
Created May 16, 2019 18:03
My .bash_profile and .bashrc
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi