Skip to content

Instantly share code, notes, and snippets.

View omofolarin's full-sized avatar

shonibare omofolarin omofolarin

View GitHub Profile
@omofolarin
omofolarin / upload_snap.js
Created April 21, 2022 05:06 — forked from Tamal/upload_snap.js
React Native File upload using XMLHttpRequest
_uploadSnap() {
var url = 'http://example.com/upload'; // File upload web service path
var photo = {
uri: this.state.picturePath, // CameralRoll Url
type: 'image/jpeg',
name: 'photo.jpg',
};
var formData = new FormData();
formData.append("file", photo);

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@omofolarin
omofolarin / README.md
Created August 21, 2022 13:24 — forked from kasperpeulen/README.md
How to pretty-print JSON using Dart.
@omofolarin
omofolarin / nginx.toml
Created September 27, 2022 06:36 — forked from yellow1912/nginx.toml
Sample Vector configuration for nginx
# be careful, you will gets tons of logs
# you may want to skip access logs or use sampling only here
[sources.nginx_access_logs]
type = "file"
include = ["/var/log/sites/*/*/*/*/nginx/access.log"] # supports globbing
ignore_older = 86400 # 1 day
# I'm configuring my nginx to use json logs, if you use another logging format you need to change this
[transforms.nginx_access_logs_json]
type = "json_parser"
@omofolarin
omofolarin / home.dart
Created November 21, 2022 20:07 — forked from NeatSnippets/home.dart
How to hide bottom navigation bar when scrolling in Flutter
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class Home extends StatefulWidget {
Home({Key key}) : super(key: key);
@override
_HomeState createState() => _HomeState();
}
@omofolarin
omofolarin / hobbies.js
Created December 19, 2022 21:14 — forked from AllanPooley/hobbies.js
Compiled List of Hobbies Array
const interests = [
'3D printing',
'Amateur radio',
'Scrapbook',
'Amateur radio',
'Acting',
'Baton twirling',
'Board games',
'Book restoration',
'Cabaret',

A Context Map Should Answer:

  • Where is the technical debt?
  • Where are the areas of technical risk?
  • What knowledge gaps do you have?

Spectrum of cooperation

@omofolarin
omofolarin / learn.md
Created February 8, 2023 07:13 — forked from rylev/learn.md
How to Learn Rust

Learning Rust

The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.

Warning

Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.

The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.

@omofolarin
omofolarin / chat_message_render_box.dart
Created May 26, 2023 10:08 — forked from craiglabenz/chat_message_render_box.dart
Demonstrates a custom RenderObject that draws chat messages like WhatsApp, where the `sentAt` timestamp is tucked into the last line if it fits
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real