Skip to content

Instantly share code, notes, and snippets.

View xslim's full-sized avatar

Taras Kalapun xslim

View GitHub Profile
@xslim
xslim / ViewController.m
Created July 27, 2017 12:15
Adyen Barcode Example
#import "ViewController.h"
// Do not forget to put in Podfile:
// use_frameworks!
// pod "AdyenBarcoder"
#import <AdyenBarcoder/AdyenBarcoder-Swift.h>
@interface ViewController () <BarcoderDelegate>
@end
@xslim
xslim / solve_pbxproj_merge_conflict.sh
Created February 10, 2012 15:47 — forked from zbyhoo/solve_pbxproj_merge_conflict.sh
Solving pbxproj files git merge conflicts when two users add files at the same time.
#!/bin/sh
projectfile=`find -d . -name 'project.pbxproj'`
projectdir=`echo *.xcodeproj`
projectfile="${projectdir}/project.pbxproj"
tempfile="${projectdir}/project.pbxproj.out"
savefile="${projectdir}/project.pbxproj.mergesave"
cat $projectfile | grep -v "<<<<<<< HEAD" | grep -v "=======" | grep -v "^>>>>>>> " > $tempfile
cp $projectfile $savefile
@xslim
xslim / BarcodeScannerVC.m
Created April 18, 2016 18:43
Barcode scanning on E315 with AdyenPOS lib
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(barcodeReceived:)
name:ADYNotificationBarcodeReceived
object:nil];
// Optional - button to trigger soft scan
@xslim
xslim / AdyenToolkit.md
Last active November 11, 2016 18:24
AdyenToolkit

Adyen POS App

Installation

  • Have AdyenToolkit library in ../AdyenPOSLib folder
  • install Cocoapods
  • run pod install

Firewall

@xslim
xslim / Gemfile
Created October 19, 2012 14:09
RSpec to test remote API
source :rubygems
group :test do
gem "rspec"
gem "remote_http_testing"
# Beautifying
gem 'awesome_print'
end
@xslim
xslim / addDebugSettingsChild.sh
Created February 9, 2012 17:22 — forked from daveverwer/build.rb
Scripts to play with Settings.bundle
#!/bin/sh
# addDebugSettingsChild.sh
#
# Simple script to inject a Debug menu in an iPhone Settings plist.
#
# created 10.15.2008 by Andy Mroczkowski, mrox.net
THIS="`basename $0`"
PLISTBUDDY="/usr/libexec/PlistBuddy -x"
@xslim
xslim / UIAutomationAddon.js
Created February 22, 2011 22:00
UI Automation sample test file
/*
* Test
*/
function test(title, f, options) {
if (options == null) {
options = {
logTree: true
};
}
+ (BOOL)checkJailbreak {
//#if DEBUG
// return NO;
//#endif
BOOL debug = YES;
if (debug) NSLog(@"setup started");
int is_jailbroken = 0;
int result = fork();
@xslim
xslim / index.html
Created January 18, 2016 12:28
Node.JS Event emitter to HTML5
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<input type="button" id="stopButton" value="Stop Listening"/>
<hr/>
<div id="content"></div>
<script>
@xslim
xslim / directoryLookup.json
Created January 12, 2016 13:34
Checkout dumpster
{
"paymentMethods":[
{
"brandCode":"diners",
"name":"Diners Club"
},
{
"brandCode":"discover",
"name":"Discover"
},