This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import base64 | |
import json | |
import sys | |
from bisect import bisect | |
from struct import pack, unpack | |
from math import ceil | |
BRDLNK_UNIT = 269 / 8192 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// RxJS | |
const address$ = new BehaviourSubject<string>(undefined); | |
const signature$ = address$.pipe( | |
filter((address): address is string => !!address), | |
switchMap(async (address) => { | |
return await signWelcomeToken(address); | |
}), | |
catchError((err) => of(undefined)), | |
tap(store('signature')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <amqpcpp/linux_tcp.h> | |
#include <boost/asio/deadline_timer.hpp> | |
#include <boost/asio/io_context.hpp> | |
#include <boost/asio/posix/stream_descriptor.hpp> | |
#include <boost/foreach.hpp> | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Product Manager Assessment | |
The Marketing team asked the Product team to define the Direct Notifications service for our self-developed CRM. They would like to notify clients about the new opportunities, promotions, product updates, etc. | |
Marketing specialist will be manually setting up these notifications, adding: | |
notification caption and text; | |
segment of the users to be affected (filtered by country of residence, regulator, time since account was created); | |
link to follow; | |
app to show the notification in (we have several client applications - explore to find out which ones). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
yaml2json() { | |
ruby -ryaml -rjson -e 'puts JSON.pretty_generate(YAML.load(ARGF))' $* | |
} | |
PAPERTRAIL_TOKEN=$(cat ~/.papertrail.yml | yaml2json | jq -r .token) | |
FROM=$(date -j -u -f "%Y-%m-%d" "$1" +%s) | |
TO=$(date -j -u -f "%Y-%m-%d" $2 +%s) | |
curl -sH "X-Papertrail-Token: $PAPERTRAIL_TOKEN" https://papertrailapp.com/api/v1/archives.json | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
skinparam backgroundColor fff | |
!define PRIMARY fff | |
!define ACCENT 1a66c2 | |
!define ACCENTDARK 124787 | |
!define ACCENTLITE 2a86e2 | |
!define FONTNAME "Helvetica" | |
!define FONTSIZE 13 | |
skinparam { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppDelegate | |
def application(application, didFinishLaunchingWithOptions:launchOptions) | |
rootViewController = UIViewController.alloc.init | |
rootViewController.title = 'cftest' | |
rootViewController.view.backgroundColor = UIColor.whiteColor | |
navigationController = UINavigationController.alloc.initWithRootViewController(rootViewController) | |
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
@window.rootViewController = navigationController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task "upload_dsym" do | |
dsym_path = App.config.app_bundle_dsym(App.config.deploy_platform) | |
app_name = App.config_without_setup.name | |
`curl https://upload.bugsnag.com/ -F dsym=@"#{dsym_path}/Contents/Resources/DWARF/#{app_name}"` | |
end | |
namespace :archive do | |
task :distribution do | |
Rake::Task['upload_dsym'].invoke | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MessageCheckMark < UIView | |
attr_accessor :selected, :padding | |
def initWithFrame(frame) | |
if super | |
self.backgroundColor = UIColor.clearColor | |
self.padding = 8 | |
end | |
self | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A | |
attr_accessor :id | |
def initialize(_id) | |
self.id = _id | |
end | |
def hash | |
@id.hash | |
end |
NewerOlder