Skip to content

Instantly share code, notes, and snippets.

View fr1550n's full-sized avatar

fr1550n fr1550n

View GitHub Profile
@branflake2267
branflake2267 / main.dart
Created March 19, 2017 23:14
Flutter - Creating a StatefulWidget
import 'package:flutter/material.dart';
void main() {
runApp(new MyApp());
}
class SandyShores extends StatelessWidget {
static String routeName = "sandyShores";
@override
class AppRestService : IAppRestService {
override fun getAppRestService(): IRestService {
val httpClient = OkHttpClient().newBuilder()
val interceptor = Interceptor { chain ->
val request = chain?.request()?.newBuilder()?.addHeader("SomeHeader", "SomeHeaderProperty")?.build();
chain?.proceed(request)
}
httpClient.networkInterceptors().add(interceptor)
val customGson = GsonBuilder().registerTypeAdapter(MyClassCloud::class.java, MyClassCloudDeserializer("1")).create()
val retrofit = Retrofit.Builder().baseUrl(IRestService.URL_BASE).addConverterFactory(GsonConverterFactory.create(customGson)).client(httpClient.build()).build()
@Skrylar
Skrylar / result.adoc
Last active March 29, 2021 12:54
Tips for Rust

Tips for Rust: Result Types

Expecting certain outcomes from a Result

Why is it that there is an Option.expect(M), but no Result.expect(M)?

I opened a pull request [pr] which put this in, and it turns out the reason there is no expect function is because you are intended to use composition:

@rpattabi
rpattabi / study_notes_vim.md
Created April 21, 2012 03:05
"Learning vi and vim editors" - study notes

Study Notes for "Learning vi and vim editors" (7th edition)
I want to take notes for only the new things I was not aware of

Vim Practice:
I am editing this using gVim through Firefox's ItsAllText! extension.


the vi text editor