Skip to content

Instantly share code, notes, and snippets.

View boska's full-sized avatar
🎯
Focusing

Yang Lee boska

🎯
Focusing
View GitHub Profile
@boska
boska / ios_sample.md
Last active May 8, 2017 03:48
iOS example

iOS ConSense API SAMPLE

Prerequisites

  • ConSense Account
  • Xcode
  • Google IMA SDK 3.5.1+

Code Snippet

1.

Consider the following code

var array1 = [1, 2, 3, 4, 5]
var array2 = array1
array2.append(6)
var len = array1.count
<vmap:VMAP xmlns:vmap="http://www.iab.net/videosuite/vmap" version="1.0">
<vmap:AdBreak breakId="preroll" breakType="linear" timeOffset="00:00:00.000">
<vmap:Extensions>
<vmap:Extension type="instream">
<position type="bottom">0</position>
<align type="bottom">0</align>
</vmap:Extension>
</vmap:Extensions>
<vmap:AdSource allowMultipleAds="false" followRedirects="true" id="preroll-ad-1">
<vmap:AdTagURI templateType="vast3">
@boska
boska / ios-interview.md
Created May 18, 2017 06:21
ios-interview.md

1.

Consider the following code

var array1 = [1, 2, 3, 4, 5]
var array2 = array1
array2.append(6)
var len = array1.count
extension URL {
func fetch(completionHandler: ((Data) -> ())? = nil) {
print("Request: \(self)")
URLSession.shared.dataTask(with: self) {
guard
let response = $1 as? HTTPURLResponse, response.statusCode == 200,
let data = $0, $2 == nil
else { return }
completionHandler?(data)
}.resume()
@boska
boska / offer.sol
Created June 21, 2017 10:04
Solidity opening application
pragma solidity 0.4.11;
contract Offer {
/* Constructor */
address public employee;
uint public safetyDeposit;
uint public offerStart;
uint public lastWithdraw;
uint public numberBlocksPerDay = 2;
uint public ratePerDay = 0.5 ether;
event Withdraw(address employee, uint amount, uint numberOfDay);
{
"roles": [
{
"user": {
"email": "bob@example.com",
"name": "bob"
},
"role": "Director",
"role_description": "role_description",
"fuctions": ["Function 1", "Function 2"],
{
"roles": [
{
"user": {
"email": "bob@example.com",
"name": "bob"
},
"role": "Director",
"role_description": "role_description",
"fuctions": ["Function 1", "Function 2"],
@boska
boska / index.html
Created October 8, 2018 10:13
yRVKaO
<div class="h-100 bg-near-white pa4 ba bw1 ma4">
<div class="f3 b avenir pv2">Bo$ka</div>
<div class="f4 avenir pv2">
<p>Venom was give them what they code venom, So Eminem Just call them Venom, For them venom is they can only drink them.
</p>
</div>
<div class="f4 avenir pv4">Sincerely, Mathew Mathers</div>
</div>
@boska
boska / flex.swift
Last active April 30, 2019 12:56
Objective-C to Swift - FLEX
// Rewrite from FLEX
import RxCocoa
import RxGesture
import RxSwift
// https://github.com/Flipboard/FLEX/blob/master/Classes/ExplorerInterface/FLEXExplorerViewController.m#L611
var overlay: UIWindow?
func findViews(at point: CGPoint, ignoreHidden: Bool = true) -> [UIView] {
return UIApplication.shared.windows