Skip to content

Instantly share code, notes, and snippets.

import UIKit
import PlaygroundSupport
class ViewController : UIViewController {
override func loadView() {
let view = UIView()
view.backgroundColor = .white
import Foundation
import XCTest
struct TodoItem {
let title: String
let dueBy: Date?
init(title: String) {
self.title = title
# group file by date.
find . -name "*_result.png" -type f -printf '%TY-%Tm-%Td\n' | sort | uniq -c
# check if character is cjk Python 3
# https://stackoverflow.com/questions/30069846/how-to-find-out-chinese-or-japanese-character-in-a-string-in-python/30070664
# -*- coding:utf-8 -*-
ranges = [
{"from": ord(u"\u3300"), "to": ord(u"\u33ff")}, # compatibility ideographs
{"from": ord(u"\ufe30"), "to": ord(u"\ufe4f")}, # compatibility ideographs
{"from": ord(u"\uf900"), "to": ord(u"\ufaff")}, # compatibility ideographs
{"from": ord(u"\U0002F800"), "to": ord(u"\U0002fa1f")}, # compatibility ideographs
{"from": ord(u"\u30a0"), "to": ord(u"\u30ff")}, # Japanese Kana
{"from": ord(u"\u2e80"), "to": ord(u"\u2eff")}, # cjk radicals supplement
@Gocrazy
Gocrazy / 0_reuse_code.js
Created September 22, 2016 02:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Gocrazy
Gocrazy / csv
Last active August 29, 2015 14:24
1,2
2,3
4,5
#include "smaato_exchange_connector.h"
#include "rtbkit/plugins/bid_request/openrtb_bid_request.h"
#include "rtbkit/plugins/exchange/http_auction_handler.h"
#include "rtbkit/core/agent_configuration/agent_config.h"
#include "rtbkit/openrtb/openrtb_parsing.h"
#include "rtbkit/plugins/bid_request/openrtb_bid_request.h"
#include "rtbkit/plugins/bid_request/openrtb_bid_source.h"
#include "soa/types/json_printing.h"
#include <boost/any.hpp>
#include <boost/lexical_cast.hpp>
#pragma once
#include "rtbkit/plugins/exchange/http_exchange_connector.h"
namespace RTBKIT{
struct SmaatoExchangeConnector : public HttpExchangeConnector
{
SmaatoExchangeConnector( ServiceBase & owner, const std::string & name );
SmaatoExchangeConnector( const std::string & name, std::shared_ptr<ServiceProxies> proxies );
/* -*- js-mode -*- */
[
{
"exchangeType": "smaato",
"listenPort": 12339,
"bindHost": "0.0.0.0",
"auctionVerb": "POST",
"auctionResource": "/bids",
"numThreads": 8
}
# exchange_testing.mk
$(eval $(call test,rubicon_exchange_connector_test,rubicon_exchange bid_test_utils openrtb_exchange openrtb_bid_request bidding_agent rtb_router cairomm-1.0 cairo sigc-2.0,boost manual))
$(eval $(call test,gumgum_exchange_connector_test,gumgum_exchange bid_test_utils openrtb_bid_request bidding_agent rtb_router cairomm-1.0 cairo sigc-2.0,boost))
$(eval $(call test,smaato_exchange_connector_test,smaato_exchange bid_test_utils openrtb_exchange openrtb_bid_request bidding_agent rtb_router cairomm-1.0 cairo sigc-2.0, boost))