Skip to content

Instantly share code, notes, and snippets.

@Aesthetikx
Aesthetikx / stimulus_scripts.html
Last active February 7, 2018 18:29
Demonstration of embedded script tags influencing stimulus target detection
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="https://unpkg.com/stimulus/dist/stimulus.umd.js"></script>
<script>
(function() {
const application = Stimulus.Application.start()
const controller = class extends Stimulus.Controller {
connect() {
@Aesthetikx
Aesthetikx / retrofit_callback_testing.java
Last active June 24, 2022 16:55
Testing Retrofit Callback style APIs with Robolectric and CountdownLatches
// WidgetApi.java
public interface WidgetApi {
@GET("/widget/{:id}")
void getWidget(@Path("id") int id, Callback<Widget> callback);
}
// MockRetrofitClient.java
public class MockRetrofitClient implements Client {
private int statusCode = 200;
@Aesthetikx
Aesthetikx / lemonbar.rb
Last active August 29, 2015 14:12
LemonBoy's Bar Ruby Config
### Config Start
width = 2560
height = 24
fg = "'#66FFFFFF'"
bg = "'#AA000000'"
font = "-xos4-terminus-*-*-*-*-18-*-*-*-*-*-*-*"
def workspace
case `bspc query -D -d`.chomp