Skip to content

Instantly share code, notes, and snippets.


João Marcos joaomarcos96

View GitHub Profile
mono0926 / main_counter.dart
Created Apr 27, 2019
View main_counter.dart
import 'package:flutter/material.dart';
const title = 'ValueListenableBuilder Demo';
void main() => runApp(App());
class App extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
slightfoot / always_scrollbar.dart
Created Mar 4, 2019
Always Visible Scrollbar for Flutter - 4th March 2019
View always_scrollbar.dart
import 'package:flutter/gestures.dart' show DragStartBehavior;
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() {
debugShowCheckedModeBanner: false,
theme: ThemeData(
primaryColor: Colors.indigo,
Blasanka / flutter_gridview.dart
Last active Jun 2, 2022
Flutter Staggered GridView for flexible different height card or content instead gridview in flutter. Read my Stack Overflow answer here:
View flutter_gridview.dart
import 'package:flutter/material.dart';
//this is what you need to have for flexible grid
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
//below two imports for fetching data from somewhere on the internet
import 'dart:convert';
import 'package:http/http.dart' as http;
//boilerplate that you use everywhere
sigu /
Created Mar 19, 2018
Installing ruby 2.3.1 using asdf on arch linux
#make sure rvm is installed then
rvm pkg install openssl
CC=gcc-6 RUBY_EXTRA_CONFIGURE_OPTIONS="--with-openssl-dir=$HOME/.rvm/usr" asdf install ruby 2.3.1
skabber / exportOptions.plist
Last active Jun 23, 2022
Export Options Plist Example
View exportOptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
akitaonrails /
Last active Apr 29, 2022
Codeminer 42 - BACKEND Test

TRZ (The Resident Zombie) - Backend

Problem Description

The world, as we know it, has fallen into an apocalyptic scenario. The "Influenzer T-Virus" (a.k.a. Twiter Virus) is transforming human beings into stupid beasts (a.k.a. Zombies), hungry to cancel humans and eat their limbs.

You, the last survivor who knows how to code, will help the resistance by deploying a system to connect the remaining humans. This system will be essential to detect new infections and share resources between the members.


spalladino /
Created Dec 22, 2015
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
OllieJones / fullquery
Last active Jul 28, 2021
Fast nearest-location finder for SQL (MySQL, PostgreSQL, SQL Server)
View fullquery
SELECT zip, primary_city,
latitude, longitude, distance
z.latitude, z.longitude,
* COS(RADIANS(z.latitude))
gshaw / carrier_wave.rb
Created Aug 14, 2014
CarrierWave initialization file for testing with fixtures and support S3 in staging and production.
View carrier_wave.rb
# NullStorage provider for CarrierWave for use in tests. Doesn't actually
# upload or store files but allows test to pass as if files were stored and
# the use of fixtures.
class NullStorage
attr_reader :uploader
def initialize(uploader)
@uploader = uploader