Skip to content

Instantly share code, notes, and snippets.

View jcreager's full-sized avatar

Joe jcreager

View GitHub Profile
var result = 0
for (var i = 2; i < process.argv.length; i++)
result += Number(process.argv[i])
console.log(result)
@jcreager
jcreager / helloWorld.js
Last active May 2, 2016 05:28
Hello World in JS
console.log('Hello World!')
@jcreager
jcreager / helloWorld.php
Last active May 2, 2016 05:31
Hello World! in PHP
<?php
print 'Hello World!'
//or
echo 'Hello World!'
?>
@jcreager
jcreager / helloWorld.py
Created May 2, 2016 05:32
Print Hello World in Python
print 'Hello World!'
@jcreager
jcreager / helloWorld.java
Created May 2, 2016 05:35
Print Hello World! in Java
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World");
}
}
@jcreager
jcreager / hellWorld.cpp
Created May 2, 2016 05:39
Print Hello World in c++
#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}
@jcreager
jcreager / helloWorld.sh
Created May 2, 2016 19:44
Print Hello World Node
$node helloWorld.js
; ----------------------------------------------------------------------------------------
;Source: http://cs.lmu.edu/~ray/notes/x86assembly/
;Writes "Hello, World" to the console using only system calls. Runs on 64-bit Linux only.
; To assemble and run:
;
; nasm -felf64 hello.asm && ld hello.o && ./a.out
; ----------------------------------------------------------------------------------------
global _start
@jcreager
jcreager / helloWorld.c
Created May 3, 2016 04:39
Hello World! in C
#include<stdio.h>
main()
{
printf("Hello World");
}
@jcreager
jcreager / wordcount.go
Created November 7, 2017 16:22
A Tour of Go - Exercise: Maps
package main
import (
"golang.org/x/tour/wc"
"strings"
)
func WordCount(s string) map[string]int {
words := strings.Fields(s)
var count map[string]int