Skip to content

Instantly share code, notes, and snippets.

View awaemmanuel's full-sized avatar
🎯
Focusing

Emmanuel Awa awaemmanuel

🎯
Focusing
View GitHub Profile
// Adapted from generic web server example as part of IDE created by David Mellis and Tom Igoe.
#include "Arduino.h"
#include <Ethernet.h>
#include <SPI.h>
#include <string.h>
#include <stdlib.h>
#define DEBUG false
@awaemmanuel
awaemmanuel / index.html
Created December 4, 2015 17:25 — forked from anonymous/index.html
JS Bin JavaScript Refresher // source http://jsbin.com/nogidalaxe
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="JavaScript Refresher">
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
p {
color: red;
}
Book the First -- Recalled to Life
Chapter I
The Period
It was the best of times, it was the worst of times, it was the age of
wisdom, it was the age of foolishness, it was the epoch of belief, it
was the epoch of incredulity, it was the season of Light, it was the
season of Darkness, it was the spring of hope, it was the winter of
The sample text is here: https://gist.github.com/0474c33e403ab243019c
Undo justification: replace all newline characters with two spaces
regex: "\n\b"
subst: "\ \ "
Replace all paragraph markers with actual paragraphs
regex: "-P-"
@awaemmanuel
awaemmanuel / tmux-cheatsheet.markdown
Created February 9, 2016 12:20 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@awaemmanuel
awaemmanuel / jupyter_shortcuts.md
Created March 16, 2016 23:55 — forked from kidpixo/jupyter_shortcuts.md
Keyboard shortcuts for ipython notebook 3.1.0 / jupyter

Toc

Keyboard shortcuts

The IPython Notebook has two different keyboard input modes. Edit mode allows you to type code/text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level actions and is indicated by a grey cell border.

MacOS modifier keys:

  • ⌘ : Command
@awaemmanuel
awaemmanuel / The Technical Interview Cheat Sheet.md
Created April 6, 2016 14:24 — 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.
@awaemmanuel
awaemmanuel / UglyNumber.java
Created April 14, 2016 19:38 — forked from cangoal/UglyNumber.java
LeetCode - Ugly Number
//
public boolean isUgly(int num) {
if (num == 0) return false;
while (num % 2 == 0) num /= 2;
while (num % 3 == 0) num /= 3;
while (num % 5 == 0) num /= 5;
return num == 1;
}
//
public boolean isUgly(int num) {
@awaemmanuel
awaemmanuel / gist:b5fb3a74202713797ff98f896c5e65e6
Created July 28, 2016 02:21 — forked from ngocdaothanh/gist:3764694
Scala Assignment: Recursion
package recfun
import scala.collection.mutable.ListBuffer
import common._
/** https://class.coursera.org/progfun-2012-001/assignment/view?assignment_id=4 */
object Main {
def main(args: Array[String]) {
println("Pascal's Triangle")
for (row <- 0 to 10) {
@awaemmanuel
awaemmanuel / WAVE.py
Created March 22, 2018 02:58 — forked from viveksyngh/WAVE.py
Given an array of integers, sort the array into a wave like array and return it, In other words, arrange the elements into a sequence such that a1 >= a2 <= a3 >= a4 <= a5.....
# @param A : A List of integers
# @return List of integers
def wave(A):
A.sort()
i = 0
while i < len(A) :
if i + 1 < len(A) :
A[i], A[i+1] = A[i+1], A[i]
i = i + 2
else :