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 / clock.elm
Last active August 16, 2021 09:25
Elm Subscription Example - Pause and Resume the clock
import Html exposing (Html, p, label, br, input)
import Html.App as Html
import Html.Attributes exposing (checked)
import Html.Events exposing (onCheck)
import Svg exposing (..)
import Svg.Attributes exposing (..)
import Time exposing (Time, second)
main =
@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