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
#include <iostream> | |
#include <dlfcn.h> | |
int main() { | |
using std::cout; | |
using std::cerr; | |
cout << "C++ dlopen demo\n\n"; | |
// open the library | |
cout << "Opening hello.so...\n"; | |
void* handle = dlopen("<<PATH_TO_.SO>>", RTLD_NOW); |
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/bash | |
export WORKSPACE=`pwd` | |
# Create/Activate virtualenv | |
virtualenv venv -p python3.6 | |
source venv/bin/activate | |
# Install/Update pytest | |
pip install -U pytest |
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 { BehaviorSubject } from 'rxjs/BehaviorSubject'; | |
import {Component, Directive, Injectable, Input, NgModule} from '@angular/core' | |
import {Subject, Subscriber} from "rxjs"; | |
import {NavigationStart} from "@angular/router"; | |
@Injectable() | |
export class ActivatedRouteStub { | |
// ActivatedRoute.params is Observable |
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 SomeTestCase(unittest.TestCase): | |
def setUp(self): | |
self.testbed = testbed.Testbed() | |
self.testbed.activate() | |
self.testbed.init_datastore_v3_stub() | |
self.testbed.init_memcache_stub() | |
ndb.get_context().clear_cache() | |
self.app = main.app.test_client() | |
# Diff is 804 characters long. Set self.maxDiff to None to see it. |
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
[TestClass] | |
public class Test | |
{ | |
private IApplication MockApp(IScreenService screenService, IMessageRouterService messageRouterService, | |
IXACService xacService, IDataService dataService) | |
{ | |
var application = Mock.Interface<IApplication>(); | |
Expect.Once.PropertyGet(() => application.ScreenService).Returns(screenService); | |
Expect.Once.PropertyGet(() => application.MsgRouterService).Returns(messageRouterService); | |
Expect.Once.PropertyGet(() => application.XACService).Returns(xacService); |
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
#!/usr/bin/python3 | |
import argparse | |
import logging | |
import os | |
import sys | |
LOG_DIR = '/var/log/' |