Skip to content

Instantly share code, notes, and snippets.

View radixdev's full-sized avatar
💭
hi

Julian Richard Contreras radixdev

💭
hi
View GitHub Profile
@radixdev
radixdev / gist:9261894
Created February 27, 2014 23:25
coding for interviews #20
class Queue(object):
def __init__(self):
self.stack1 = Stack()
self.stack2 = Stack()
def enqueue(self,p):
self.stack1.push(p)
def dequeue(self):
#pop off all in 1 onto 2
@radixdev
radixdev / string_format_to_concat.rb
Created June 2, 2017 16:53
Converts string format to string concat
#!/usr/bin/env ruby
def show_user_prompt(msg)
puts msg
# flush our message to display
STDOUT.flush
return STDIN.gets.chomp
end
def get_user_input
#!/usr/bin/env ruby
# take some text, make it into a big block of warning text
# like this:
# ***********************************************************************************************
# ** !! WARNING !! **
# ** InAppMessageEvent was published, but no subscribers were found. **
# ** This is likely an integration error. Please ensure that the AppboyInAppMessageManager is **
# ** registered as early as possible. Additionally, be sure to call **
@radixdev
radixdev / _assorted android scripts
Last active August 23, 2017 18:44
Assorted android scripts
.
@radixdev
radixdev / papertrail_error_bucketizer.rb
Created October 3, 2017 18:00
Grabs the error class from the papertrail daily reports
#!/usr/bin/env ruby
def pbpaste
`pbpaste`
end
# get the raw text
papertrail_text = pbpaste()
# match for the error types
@radixdev
radixdev / strings.xml
Last active September 13, 2018 14:01
strings.xml
<resources>
<string name="app_name">Thinker</string>
<!-- Slides for the intro -->
<string name="welcome_slide_title">Welcome to your Trivia Assistant!</string>
<string name="welcome_slide_description">I provide answers to trivia questions in the background while you play</string>
<string name="what_is_trivia_slide_title">What does a trivia game look like?</string>
<string name="what_is_trivia_slide_description">It\'s a question, followed by 3 answers.</string>
@radixdev
radixdev / cloudSettings
Last active August 20, 2019 20:32
Visual Studio Code Settings Sync Gist for Work laptop
{"lastUpload":"2019-08-20T19:07:01.697Z","extensionVersion":"v3.4.1"}
openapi: 3.0.3
info:
version: '3.0'
title: 'V3'
description: |
Request Timing
When methods on the SDK are called, it should generally enqueue data locally into offline storage, and make batched flushes to the above endpoints on a timed basis, or when explicitly requested by the user. In general, the default flush interval should be in the 10s of seconds (reasonable default may depend on the nature of the platform), and should be configurable.
In the case of request failure (any non-20x response), the SDK should re-enqueue any failed events or attributes into local offline storage, and should begin an exponential slowdown of the flush interval, until a successful response is received. The backoff function should follow the decorrelated jitter algorithm below:
@radixdev
radixdev / logs.txt
Last active August 18, 2021 23:16
xamarin diagnostic logs
This file has been truncated, but you can view the full file.
Building solution Android (Debug)
Build started 8/18/2021 7:14:48 PM.
Environment at start of build:
COMMAND_MODE = unix2003
XPC_SERVICE_NAME = com.microsoft.visual-studio.6216
ServiceHubUniqueLogDir = vsmac
LANGUAGE = en
DOTNET_MSBUILD_SDK_RESOLVER_CLI_DIR = /usr/local/share/dotnet
PATH = /Library/Frameworks/Mono.framework/Commands:/Applications/Visual Studio.app/Contents/Resources:/Applications/Visual Studio.app/Contents/MacOS:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:~/.dotnet/tools:/usr/local/share/dotnet
@radixdev
radixdev / emulator.java
Last active October 13, 2021 17:29
detects emulators
package com.radix.triviaassistant.models.util;
import android.os.Build;
import android.os.Bundle;
import com.radix.triviaassistant.BuildConfig;
import com.radix.triviaassistant.models.events.AnalyticsSingleton;
public class EmulatorDetector {