Skip to content

Instantly share code, notes, and snippets.

@vgonda
vgonda / buffer-start.sh
Created August 2, 2019 13:47
Getting my day started at Buffer
#!/bin/bash
echo "Getting started for the day"
echo "Opening Chrome"
/usr/bin/open -a "/Applications/Google Chrome.app" 'https://messages.android.com/' 'https://hangouts.google.com/' 'https://buffer.slack.com' 'https://mail.google.com' 'https://buffer.atlassian.net/secure/RapidBoard.jspa?rapidView=63' 'https://threads.com' 'https://console.firebase.google.com/u/1/project/buffer-publish-mobile/crashlytics/app/android:org.buffer.android/issues?state=open&time=last-seven-days&type=crash' 'https://reply.buffer.com/open/1'
echo "Opening Slack"
/usr/bin/open -a "Slack"
@vgonda
vgonda / light.css
Created December 28, 2018 21:00
Kotlin playground light theme
.playground .code-area {
background-color: #FAFAFA;
}
.executable-fragment .darcula {
background-color: #FAFAFA;
}
.cm-s-darcula.CodeMirror {
background: #FAFAFA;
@vgonda
vgonda / learning_kotlin.md
Last active July 17, 2018 19:48
A collection of jumping off points to learn Kotlin

Time to learn some Kotlin!

Here's some of my favorite resources to learn Kotlin, and keep learning. It's by no means a complete list. I'd love to hear what some of your favorites are!

Dive right in

  • Huge, awesome list of more resources and projects
  • Try out Kotlin right from the browser
@vgonda
vgonda / decompiled-user-data-class.java
Created April 17, 2017 20:44
Decompiled Kotlin User Data Class
public final class User {
@NotNull
private final String firstName;
@Nullable
private String lastName;
public User(@NotNull String firstName, @Nullable String lastName) {
Intrinsics.checkParameterIsNotNull(firstName, "firstName");
super();
this.firstName = firstName;
@vgonda
vgonda / decompiled-user-class.java
Created April 17, 2017 19:45
Decompiled Kotlin User Class
public final class User {
@NotNull
private final String firstName;
@Nullable
private String lastName;
public User(@NotNull String firstName, @Nullable String lastName) {
Intrinsics.checkParameterIsNotNull(firstName, "firstName");
super();
this.firstName = firstName;
@vgonda
vgonda / donutsMVP.swift
Created March 21, 2017 14:56
Example Donuts MVP architecture
class DonutsViewController: UIViewController, DonutsView {
lazy let presenter = { DonutsPresenter(view: self) }()
override func showLoading() {
}
override func showNoBringers() {
}
@vgonda
vgonda / edit.html.erb
Last active July 4, 2017 09:06
Example for Selectize.js blog post
<%= form_for @user, html: { "data-account-emails": @user.email_addresses.join(",") do |form| %>
<label>
Email<br>
<%= f.text_field :email, value: f.object[:email], class: "email-autocomplete" %>
</label>
<% end %>
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head><body data-pinterest-extension-installed="cr1.39.2">
<script src="./collision_detection_files/d3.v3.min.js"></script>
<script>
var width = 960,
height = 500;
var nodes = d3.range(200).map(function() { return {radius: Math.random() * 12 + 4}; }),
@vgonda
vgonda / lolcatgame.lol
Last active December 26, 2015 21:48
KITTAH GAME MADE IN LOLCODE
HAI 1.2
CAN HAS STDIO?
VISIBLE "IS KITTAH GAME!"
VISIBLE "ENTER 'HELP' FOR CONTROLS"
VISIBLE ""
I HAS A NAME
VISIBLE "WHAT IS KITTAH'S NAME?"
GIMMEH NAME
@vgonda
vgonda / MainActivityTest.java
Created June 11, 2015 13:51
Example of how to use espresso-intents in Android tests
package com.collectiveidea.example;
import android.content.Intent;
import android.support.test.espresso.intent.Intents;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import com.collectiveidea.example.ui.LoginActivity;
import com.collectiveidea.example.ui.MainActivity;
import com.collectiveidea.example.util.AccountUtility;