Skip to content

Instantly share code, notes, and snippets.

View coquer's full-sized avatar

Jorge Y. C. Rodriguez coquer

View GitHub Profile
from PIL import Image
from bisect import bisect
def main():
gscale = {8:'@', 7:'#', 6:'£', 5:'=', 4: '+', 3: '|', 2: ':', 1: '.', 0: ' '}
bounds = [32,64,96,128,160,192,224]
txt = ""
jpegFilename = input('enter jpg file path: ')
@coquer
coquer / Apache Server.sh
Created May 30, 2016 06:54 — forked from efreed/AWS Account Init.txt
AWS Web Server
Launch Amazon Linux T2 Micro or T2 Nano instance
- Defaults are mostly good, Except select http and admin security groups
SSH:
ssh -i key.pem ec2-user@1.2.3.4
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html
sudo yum update -y
@coquer
coquer / The Technical Interview Cheat Sheet.md
Last active August 26, 2015 10:47 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@coquer
coquer / hack.py
Last active August 29, 2015 14:25 — forked from ttsiodras/hack.py
I just did something that depending on your viewpoint on coding, is either an insult to God and humanity, or absolutely brilliant.
#
# I inherited a large code base, where hundreds of code paths end up
# calling "common_function_called_in_gazillion_places".
#
# And the need arose for this function to access the HTTP request's
# headers...
#
# What to do? Refactor all the places leading up to here? In a dynamically
# typed language, with no compiler to tell us the places to refactor?
#
@coquer
coquer / markdown.css
Last active August 29, 2015 14:19 — forked from imjasonh/markdown.css
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
// Playground - noun: a place where people can play
import UIKit
// Setup the calendar object
let calendar = NSCalendar.currentCalendar()
// Set up date object
let date = NSDate()

Building our first Camera App

In the first ever SwiftCast TV screencast. We will teach you how to build a Camera application that allows you to take a photo, select an existing photo, and view our selected photo. Let’s get started.

Chapter 1: Setting up our Application

Create a new Application by clicking "Create a new Xcode project". When asked to Choose a template for your new project, we are going to select "Single View Application" under iOS/Application. Then click the "Next" button.