Skip to content

Instantly share code, notes, and snippets.

View martimatix's full-sized avatar

Mario Martinez martimatix

View GitHub Profile

Header 1

Header 2

Header 3

Some paragraph of text.

@martimatix
martimatix / demo.md
Created January 12, 2015 01:31 — forked from wofockham/demo.md

Groucho

Harpo

Chico

Some paragraph of text.

Separate paragraph.

@martimatix
martimatix / 120115.md
Last active August 29, 2015 14:13
Notes from WDI Week 1

#Command Line Just jotting down the ones that I didn't know about.

  • top Table of processes
  • whoami
  • open . open in finder
  • cd - Effectively a 'back' in windows
  • ls -la long listing that lists hidden files
  • cat (eg cat readme) Displays the file
  • open -a "Sublime Text" [filename] Long way to open something in Sublime 3
@martimatix
martimatix / calc.rb
Last active August 29, 2015 14:13
Simple Calc
# $ gem install rainbow
require "rainbow"
def read_choice
puts " S I M P L E C A L C ".center(80, ?=)
puts "Available functions:\n\n"
puts "\t1. Addition"
puts "\t2. Subtraction"
puts "\t3. Multiplication"
puts "\t4. Division"
=begin
On Friday afternoon, our instructor put us into groups of three for a quiz.
A girl in our class ended up in a group of all girls and asked:
"What are the odds of there being in an all girl group?"
While the girl who asked the question did not expect a serious answer, the
question piqued my curiosity. The easiest way to get the answer is by
simulation and hence this script was created.
=end
@martimatix
martimatix / colr.js
Created February 20, 2015 23:05
Colr
// Requires pusher.js from http://surfacecurve.org:8708/libraries/color
// Curl command:
// curl http://surfacecurve.org:8708/platform/pusher/script/pusher.color.js > js/pusher.js
// Add this to html before colr.js:
// <script src="js/pusher.js"></script>
$(window).on('mousemove', function (event) {
var hue = Math.round((event.pageX / window.innerWidth) * 360);
[
{
"category": {
"iconPath": null,
"id": 4,
"keywords": [
"Learning",
"Education"
],
"name": "Education Centres"
@martimatix
martimatix / Main-v1.elm
Created June 26, 2016 07:12
movie_poster_finder
import Html exposing (..)
import Html.App as Html
import Html.Attributes exposing (..)
import Html.Events exposing (..)
main =
Html.program
{ init = init
, view = view
, update = update
import Html exposing (..)
import Html.App as Html
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import WebSocket
import List
main: Program Never
main =
Html.program
@martimatix
martimatix / index.html
Last active October 9, 2016 03:31
Initialisation code for crystal-elm-chat
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Elm Crystal Chat Proof of Concept</title>
<script src="elm.js"></script>
</head>
<body>
<script type="text/javascript">
const websocketProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';