Skip to content

Instantly share code, notes, and snippets.

View bdenney's full-sized avatar

Brandon Denney bdenney

View GitHub Profile
@icedraco
icedraco / test-request.kt
Created December 31, 2019 16:53
HTTP requests using Kotlin and a built-in java.net.URL class
package org.icerealm.examples
import java.net.HttpURLConnection
import java.net.URL
fun main() {
val url = URL("https://postman-echo.com/status/403")
val con: HttpURLConnection = url.openConnection() as HttpURLConnection
con.requestMethod = "GET"
con.connectTimeout = 10*1000
@irace
irace / node.md
Last active August 29, 2015 14:00
Node.js for mobile developers

Node.js for mobile developers

Bryan Irace


What is Node.js?

A platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.


@JakeWharton
JakeWharton / Truss.java
Last active May 7, 2025 11:16
Extremely simple wrapper around SpannableStringBuilder to make the API more logical and less awful. Apache 2 licensed.
import android.text.SpannableStringBuilder;
import java.util.ArrayDeque;
import java.util.Deque;
import static android.text.Spanned.SPAN_INCLUSIVE_EXCLUSIVE;
/** A {@link SpannableStringBuilder} wrapper whose API doesn't make me want to stab my eyes out. */
public class Truss {
private final SpannableStringBuilder builder;
private final Deque<Span> stack;
@codingjester
codingjester / etrade.rb
Created August 28, 2013 13:55
Scraping the totalMarketValue of your E*Trade account. Probably could be better. You pass in your username/password as arguments to the script.
require 'mechanize'
a = Mechanize.new
a.get('https://us.etrade.com/home') do |page|
mypage = page.form_with(:action => '/login.fcc') do |f|
f.USER = ARGV[0]
f.PASSWORD = ARGV[1]
end.click_button