Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
@Teino1978-Corp
Teino1978-Corp / path.md
Created November 16, 2015 17:57
True Path

True learning path one should follow

Deep Dive in Programming, Algorithms and Math

fractal

"Any fool can know. The point is to understand" - Albert Einstein

1: Babysteps with C

@Teino1978-Corp
Teino1978-Corp / gist:5b5dda0f16de9a99d8d5
Created November 16, 2015 17:45
Unremovable "== true ? true : false"
using System;
class Program
{
static void Main(string[] args)
{
Console.WriteLine(new Program().M());
}
bool M()
@Teino1978-Corp
Teino1978-Corp / Class(using getset)property
Created November 16, 2015 05:36
In this project we will lean about the use of get set property in c#
First we create a class & write the following code:
public class StudentMethod
{
public int Roll { get; set; }
public string Name { get; set; }
}
@Teino1978-Corp
Teino1978-Corp / LeanArchitecture.md
Created November 16, 2015 05:23
Lean Architecture: for Agile Software Development (Jim Coplien, Gertrud Bjørnvig)

Subdivision

What the system is (User Thinking)

  • Classes & Objects
  • Domain Experts
  • Architects
  • Database schemas
  • Long-term stable structure
  • Form
@Teino1978-Corp
Teino1978-Corp / git-sub
Created November 16, 2015 04:39
A lean approach to managing git subtrees manually
#!/usr/bin/env bash
# Add a subtree from a repository
#
# @param 1 - URL of repository
# @param 2 - prefix for repository directory (optional)
add()
{
local NAME=${1##*/}
NAME=${NAME%.*}
@Teino1978-Corp
Teino1978-Corp / gist:6a1646eb68e35b4de9cf
Created November 16, 2015 03:05
Lean Principles...
(See http://xprogramming.com/articles/deliver-working-software-frequently/ and http://leanblitzconsulting.com/14-principles-of-the-toyota-way/)
Are you not getting everything you take on finished? Then take on less.
"Use pull systems to avoid overproduction"
Are there defects in your code? Then test it sooner and better. Try pair programming.
"Level out the workflow. Work like the tortoise, not the hare" and “Use visual controls so no problems are hidden.”
Is your code hard to work with? Then refactor it as you go.
"Build a culture of stopping to fix problems, to get quality right the first time"
@Teino1978-Corp
Teino1978-Corp / learn_liunx02.sh
Created November 16, 2015 03:00
Lean the command.
# basic command
uname -a
cat /etc/proc/version
# zip / unzip
tar -czvf shared.tar.gz shared
tar -tzvf shared.tar.gz
tar -xzvf shared.tar.gz
gzip 1.js
gzip -d *.gz
@Teino1978-Corp
Teino1978-Corp / index.php
Created November 16, 2015 02:51
Lean Code's
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sistema de Cadastro - São Judas</title>
<meta name="description" content="Cadastro CISE - São Judas" />
<meta name="keywords" content="page transition, Sao Judas, website, cadastro, css3, jquery" />
<meta name="author" content="Leandro Cubas" />
@Teino1978-Corp
Teino1978-Corp / lean_application.rb
Created November 16, 2015 02:43
Lean Rails Application
Doing it this way means you are loading the app directly from a custom boot script. I also specified a custom environment and Gemfile:
RAILS_ENV=lean_development BUNDLE_GEMFILE=LeanGemfile bundle exec script/lean
@Teino1978-Corp
Teino1978-Corp / exception_handler.js
Created November 16, 2015 02:33
Javascript: Lean Exception handler
/**
* lsauer, 2013
* Lean handler for exception reporting; stdout is set by default to console.log
* @param {exc} exc an Exception instance of Error, containing a message and stack property
* @param {exc} stdOut A variadic function for error reporting. By default: console.log
* @return undefined
*/
var exceptionHandler = function(exc, stdOut){
var stdOut = stdOut || function() { console.log.apply(console, arguments) };
if(stdOut instanceof Function){