Skip to content

Instantly share code, notes, and snippets.

View SirWellington's full-sized avatar

Wellington Moreno SirWellington

View GitHub Profile
@SirWellington
SirWellington / WorstFunctionEver.java
Created April 1, 2019 00:24
This is the worst function I have ever read, courtesy of Android's FragmentManagerImpl class
void moveToState(Fragment f, int newState, int transit, int transitionStyle,
boolean keepActive) {
// Fragments that are not currently added will sit in the onCreate() state.
if ((!f.mAdded || f.mDetached) && newState > Fragment.CREATED) {
newState = Fragment.CREATED;
}
if (f.mRemoving && newState > f.mState) {
if (f.mState == Fragment.INITIALIZING && f.isInBackStack()) {
// Allow the fragment to be created so that it can be saved later.
newState = Fragment.CREATED;
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

@SirWellington
SirWellington / .bash_profile
Last active July 10, 2018 16:22 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@SirWellington
SirWellington / Palindrone.swift
Created March 11, 2017 08:57
Swift - Palindrome Test
import Foundation
for _ in 1...5 {
print("Hello, World!")
}
func reverseString(_ string: String) -> String {
var result = ""