Skip to content

Instantly share code, notes, and snippets.

@IGitGotIt
IGitGotIt / tieBreaker
Created March 13, 2021 04:40
otk_publisher_on_answer does not have tieBreaker
[DEBUG] otk_publisher_private.cpp:1672 - otk_publisher_on_answer[otk_publisher* publisher=0x7f9ace704080,struct otk_session* session=0x7f9ace405d20,const char* sdp=v=0
o=- 7868958908809227110 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:l/9m
@IGitGotIt
IGitGotIt / a.txt
Last active May 28, 2020 00:03
simulcast sdp
2 streams - mario - look for ssrc-group:SIM
[DEBUG] otk_sdp_helper_simulcast_v2.cpp:104 - RESULTING sdp=v=0
o=- 6779221414291664004 2 IN IP4 127.0.0.1
s=-
t=0 0
// Step 1
// I am using Single Cam as our basic example
// based on torch related methods from
// https://github.com/opentok/opentok-ios-sdk-samples/blob/master/Custom-Video-Driver/Lets-Build-OTPublisher/Single-Cam-Capturer/TBExampleVideoCapture.m#L145
//Step 2
// You can expose those torch method in TBExampleVideoCapture.h
- (BOOL) hasTorch;
Ld /Users/jshah2/Library/Developer/Xcode/DerivedData/OpenTok-gpsgeupmscovbhgunflsfgaeojju/Build/Products/Debug-iphoneos/OpenTok.framework/OpenTok normal arm64 (in target 'OpenTokDyn' from project 'OpenTok')
cd /Users/jshah2/myCode/native-sdk-src/project/otc-ios/OpenTok
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target arm64-apple-ios9.0 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -L/Users/jshah2/Library/Developer/Xcode/DerivedData/OpenTok-gpsgeupmscovbhgunflsfgaeojju/Build/Products/Debug-iphoneos -L/Users/jshah2/myCode/native-sdk-src/project/otc-ios/OpenTok/../../../src/otc-ios/src/third_party/webrtc/prebuilts/iphoneos-arm64-Release/lib -F/Users/jshah2/Library/Developer/Xcode/DerivedData/OpenTok-gpsgeupmscovbhgunflsfgaeojju/Build/Products/Debug-iphoneos -filelist /Users/jshah2/Library/Developer/Xcode/DerivedData/OpenTok-gpsgeupmscovbhgunflsfgaeojju/Build/Intermediates.n
var numbers = "1234567";
var lengthOfString = numbers.length;
var rString = "";
var aRev = []
var divString = "";
var elemLength = 3;
while (lengthOfString != 0 ) {
rString += numbers[lengthOfString - 1];
override func viewDidLoad() {
super.viewDidLoad()
#warning("Use either this code or the views in the storyboard, or you will have a duplicated view hierarchy")
let coverImageView = ShadowedImageView(frame: .zero)
coverImageView.image = #imageLiteral(resourceName: "Crime and punishment")
coverImageView.contentMode = .scaleAspectFit
view.addSubview(coverImageView)
let titleLabel = UILabel()
@IGitGotIt
IGitGotIt / MFLogs
Last active December 7, 2018 19:27
Manifold grafton test logs flow via ruby httpparty
/usr/local/Cellar/ruby/2.5.1/bin/ruby /usr/local/lib/ruby/gems/2.5.0/gems/ruby-debug-ide-0.7.0.beta6/bin/rdebug-ide --key-value --disable-int-handler --evaluation-timeout 10 --evaluation-control --time-limit 100 --memory-limit 0 --rubymine-protocol-extensions --port 52578 --host 0.0.0.0 --dispatcher-port 52579 -- /Users/jaideep/Development/Manifold/ruby-sinatra-sample-provider/app.rb
Fast Debugger (ruby-debug-ide 0.7.0.beta6, debase 0.2.3.beta2, file filtering is supported) listens on 0.0.0.0:52578
[2018-12-07 11:17:11] INFO WEBrick 1.4.2
[2018-12-07 11:17:11] INFO ruby 2.5.1 (2018-03-29) [x86_64-darwin17]
== Sinatra (v1.4.8) has taken the stage on 4567 for development with backup from WEBrick
[2018-12-07 11:17:11] INFO WEBrick::HTTPServer#start: pid=18015 port=4567
opening connection to localhost:3001...
opened
GET /client_event_*2018-07-23%2Crumor_access_*2018-07-23%2Cmantis_access_*2018-07-23%2Cclient_qos_*2018-07-23%2Cminion_*2018-07-23%2Cwormhole_*2018-07-23%2Canvil_access_*2018-07-23/client_event%2Cclient_event_proc%2Cclient_qos_proc%2Cclient_qos%2Crumor_access_proc%2Crumor_access%2Cmantis_access_proc%2Cmantis_access%2Cminion_proc%2Cminion%2Cwormhole%2Cwormhole_proc%2Canvil_access_proc/_search
{
"size": 4000,
"query": {
"bool": {
"filter": {
"bool": {
"must": [
{
"bool": {
curl -XPOST http://elastic.tokbox.com:9200/client_event_*/_search -d '{
"size": 4000,
"query": {
"bool": {
"filter": {
"bool": {
"must": [
{
"bool": {
"should": [
@IGitGotIt
IGitGotIt / gist:a1431b5b210f6dbd8f769e569399d161
Created February 27, 2018 22:39
ios orientation full screen
- (void)viewDidLoad
{
[super viewDidLoad];
[[NSNotificationCenter defaultCenter]
addObserver:self selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification
object:[UIDevice currentDevice]];