Skip to content

Instantly share code, notes, and snippets.

View taufikobet's full-sized avatar

Taufik Obet taufikobet

View GitHub Profile
@taufikobet
taufikobet / .gitignore
Last active January 4, 2016 18:48
A forked Objective-C Github .gitignore
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
@taufikobet
taufikobet / ReactiveCocoaUtil.swift
Last active August 29, 2015 14:26 — forked from dennisfarandy/ReactiveCocoaUtil.swift
some reactivecocoa util that colin eberhardt create, source : https://github.com/ColinEberhardt/ReactiveSwiftFlickrSearch
//
// RACSignal+Extensions.swift
// ReactiveSwiftFlickrSearch
//
// Created by Colin Eberhardt on 15/07/2014.
// Copyright (c) 2014 Colin Eberhardt. All rights reserved.
//
import Foundation
@taufikobet
taufikobet / unicorn.rb
Created November 5, 2015 06:03 — forked from johnantoni/unicorn.rb
unicorn + nginx setup + ssl
unicorn.rb
-----------------------------------
application = "jarvis"
remote_user = "vagrant"
env = ENV["RAILS_ENV"] || "development"
RAILS_ROOT = File.join("/home", remote_user, application)
worker_processes 8
timeout 30
@taufikobet
taufikobet / lambda-sns-slack.js
Last active February 20, 2021 11:47
AWS Lambda: SNS Topic Notification to Slack (useful for tracking SNS push notification errors via Slack)
https = require('https');
url = require('url');
util = require('util');
slack_url = 'https://hooks.slack.com/services/${insert}/${your-token}/${here}';
slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@taufikobet
taufikobet / gist:a5545976288d079346ecd780a9de7639
Created February 20, 2018 16:17 — forked from omz/gist:1102091
Creating arbitrarily-colored icons from a black-with-alpha master image (iOS)
// Usage example:
// input image: http://f.cl.ly/items/3v0S3w2B3N0p3e0I082d/Image%202011.07.22%2011:29:25%20PM.png
//
// UIImage *buttonImage = [UIImage ipMaskedImageNamed:@"UIButtonBarAction.png" color:[UIColor redColor]];
// .h
@interface UIImage (IPImageUtils)
+ (UIImage *)ipMaskedImageNamed:(NSString *)name color:(UIColor *)color;
@end
@taufikobet
taufikobet / vision.py
Created January 3, 2024 08:49 — forked from RhetTbull/vision.py
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images """
import pathlib
import Quartz
import Vision
from Cocoa import NSURL
from Foundation import NSDictionary
# needed to capture system-level stderr
from wurlitzer import pipes