Skip to content

Instantly share code, notes, and snippets.

View itsgreggreg's full-sized avatar
🍹
chillin

Greg Baraghimian itsgreggreg

🍹
chillin
View GitHub Profile
@itsgreggreg
itsgreggreg / Spark Bot
Last active August 29, 2015 14:18
Spark Bot
_,-,_
,-' |. '-,
/ .| \
/ |. \
/ .| \
/ . |. \
/ | | .| | \
/ | | |. | \
\|/ / | | .| | \ \|/
- *<(( ' |. ))>* -
@itsgreggreg
itsgreggreg / git-tour.md
Last active August 29, 2015 14:18
An quick tour of git and it's commands

What is git?

git is a tool for managing programming projects. A programming project is a collection of related files and folders inside 1 main directory that is named after our project. When a programming project is using git, that project is said to be a repository. Sometimes people say the files are in git.

Using git allows us to do many things:

  • We can easily share our code with others.
  • We can easily collaborate with others on our project.
  • Everyone can easily have the most recent files in our project.
  • We can see a history of our project.
  • We can recover old files or parts of files.
  • We can work on the same files as others at the same time.
@itsgreggreg
itsgreggreg / node-tcp-chat.md
Last active February 23, 2021 14:15
Simple TCP 1 to 1 chat in Node

Simple TCP 1 to 1 chat on Node

Can be used to establish a 1 to 1 chat across any TCP network with static IP addresses, such as a LAN or WAN.

Usage

Open a terminal

  • Start the server
  • node --harmony tcp-chat-server.js
  • Give it your name
  • Wait for a connection
  • Start chatting
[
{
title: "Arturia Microbrute",
description: "The MicroBrute SE features a single VCO with three waveforms you can mix at will, three waveshapers, an overtone generator, a classic Steiner-Parker filter, and Arturia's 'Brute Factor'. You also get a step sequencer and a Mod Matrix that let the MicroBrute SE connect with other analog devices and even modular synthesizers. The SE model includes messenger-style gig bag and 4 stackable jack cables.",
image: "http://ecx.images-amazon.com/images/I/61M8sGMMgQL._SX522_.jpg"
},
{
title: "Canon Rebel T5",
description:"The Canon EOS Rebel T5 SLR camera with the EF-S 18-55mm IS II standard zoom lens is perfect for families, budding photo enthusiasts and first-time SLR users alike. EOS Rebel T5 makes it easy to capture movies and photos that are nothing short of dazzling.",
image: "http://ecx.images-amazon.com/images/I/71tz63oxXqL._SY450_.jpg"
['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
@itsgreggreg
itsgreggreg / index.html
Created June 29, 2015 21:02
JQuery Warmup
<!DOCTYPE html>
<html>
<head></head><body>
<div id="everything">
<h1>A heading!</h1>
<p>Here's some text!</p>
<p>Here's a second set of text!</p>
<div class="holder">
<ul>
<li>List Item 1</li>
http://api.openweathermap.org/data/2.5/weather?q=New%20Orleans&mode=json&units=imperial
@itsgreggreg
itsgreggreg / reduce.md
Last active August 29, 2015 14:24
What is reduce

###Reduce is just a convenience method.
You can write any reduction as a simple loop

Given this list:

var list = [1,2,3,4,5];

This "reduction"

@itsgreggreg
itsgreggreg / tracker.html
Last active August 29, 2015 14:24
tracker
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<script src="https://rawgit.com/jonthornton/jquery-timepicker/master/jquery.timepicker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.3/handlebars.js"></script>
<link rel="stylesheet" href="https://rawgit.com/jonthornton/jquery-timepicker/master/jquery.timepicker.css">
<script src="tracker.js"></script>
<script id="activity-template" type="text/x-handlebars-template">
<div class="activity">
@itsgreggreg
itsgreggreg / README.md
Last active August 29, 2015 14:24
blog server

##What? A quick lesson in serverside javascript. Creates a super basic blog that gets and posts via AJAX and saves to a JSON file. Demonstrates many important web development concepts. After finishing the project get students to talk about how they would implement other features like editing posts and basic security.

##Features

  • posts.json holds all the posts, students can see just how data is stored and can edit it manually.
  • jquery handles ajax requests for geting and posting blog posts.
  • post form is initially hidden, shows when there is a location.search like ?admin
  • handlebars handles templates for super simple templating, just two lines of JS and the templates are written in HTML

##Setup