Skip to content

Instantly share code, notes, and snippets.

@atkit
atkit / pull-all.sh
Created September 17, 2018 08:32
Bash Script - Git Pull All Folders in the current folder
#!/bin/bash
for file in */ ; do
if [[ -d "$file" && ! -L "$file" ]]; then
echo "----------------------------------------------------------------------------------------"
echo "🍄 Pulling $file"
cd $file
git pull --verbose
cd ..
echo "----------------------------------------------------------------------------------------"

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@atkit
atkit / btc-eth-dca-buy.php
Created August 24, 2017 18:12 — forked from levelsio/btc-eth-dca-buy.php
This script runs daily and "Dollar Cost Average"-buys $40 BTC and $10 ETH per day
<?
//
// [ BUY BTC & ETH DAILY ON BITSTAMP ]
// by @levelsio
//
// 2017-08-23
//
// 1) buy $40/day BTC
// 2) buy $10/day ETH
//
@atkit
atkit / ios-cell-registration-swift.md
Created May 11, 2016 19:40 — forked from gonzalezreal/ios-cell-registration-swift.md
iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

A common task when developing iOS apps is to register custom cell subclasses for both UITableView and UICollectionView. Well, that is if you don’t use Storyboards, of course.

Both UITableView and UICollectionView offer a similar API to register custom cell classes:

public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
@atkit
atkit / MailComposerBuilder.h
Created October 17, 2014 16:20
Mail Compose Builder - Easy to use helper to present MailComposer, includes convenient category for UIViewController
// Created by Andrew on 24.08.13.
// Copyright (c) 2013 Andrew Tokarev. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MessageUI/MessageUI.h>
@interface MailComposerBuilder : NSObject<MFMailComposeViewControllerDelegate>
+ (id) builder;
@atkit
atkit / UIApplication+Notifications.h
Last active August 29, 2015 14:07
iOS8 Push Notifications Tricks (Category)
#import <UIKit/UIKit.h>
@interface UIApplication (Notifications)
- (void) registerForAllNotificationTypes;
@end
@atkit
atkit / syncgateway_config_with_guest_enabled.json
Created August 27, 2014 08:47
Couchbase Sync Gateway Config With Guest Access Enabled
{
"log": ["CRUD", "CRUD+", "HTTP", "HTTP+", "Access", "Cache", "Changes", "Changes+"],
"interface":":4984",
"adminInterface":":14985",
"facebook":{
"register":true
},
"databases":{
"gw":{
"users": {
@atkit
atkit / syncgateway_config.json
Created August 26, 2014 15:35
Couchbase Sync Gateway Config
{
"log": ["CRUD", "CRUD+", "HTTP", "HTTP+", "Access", "Cache", "Shadow", "Shadow+", "Changes", "Changes+"],
"interface":":4984",
"adminInterface":":14985",
"facebook":{
"register":true
},
"databases":{
"gw":{
"server":"http://localhost:8091",
@atkit
atkit / syncgateway_walrus_config.json
Created August 26, 2014 15:14
Couchbase Sync Gateway Config for Walrus
{
"log": ["CRUD", "CRUD+", "HTTP", "HTTP+", "Access", "Cache", "Shadow", "Shadow+", "Changes", "Changes+"],
"interface":":4984",
"adminInterface":":14985",
"facebook":{
"register":true
},
"databases":{
"gw":{
"server":"walrus:data",
@atkit
atkit / .gitignore
Created August 26, 2014 14:29
My XCode .gitignore
# Xcode
.DS_Store
/build/*
*/build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3