Skip to content

Instantly share code, notes, and snippets.

View jabrena's full-sized avatar

Juan Antonio Breña Moral jabrena

View GitHub Profile
@ayyytam
ayyytam / TwentyFourtyEight
Last active August 4, 2022 18:02
2048 terminal game
// Terminal 2048
// By: Andrew Tam
// There is currently no GUI for this game and is played completely on the Terminal.
// Type in the instructions such as "up", "down", "left", "right" to move the tiles
// Type in "reset" to reset the game
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Random;
@nottsknight
nottsknight / install-java.sh
Last active April 27, 2017 20:54
BASH script to install the Java Development Kit. User must download the JDK themselves, and then give the path to the downloaded .tar.gz archive as the only command-line argument.At the end of the script, a series of menus appear, presenting all the different places where the system can find the 'java' (or javac, etc.) command in a numbered list…
#!/usr/bin/env bash
# Abort if not super user
if [[ ! `whoami` = "root" ]]; then
echo "You must have administrative privileges to run this script"
echo "Try 'sudo ./install-java.sh'"
exit 1
fi
# Check that the file is a JDK archive
@btoone
btoone / curl.md
Last active April 2, 2024 20:18
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@erjjones
erjjones / JekyllListAllPosts.html
Created March 8, 2012 03:22
Jekyll List All Posts
{% for post in site.posts %}
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
<p><small><strong>{{ post.date | date: "%B %e, %Y" }}</strong> . {{ post.category }} . <a href="http://erjjones.github.com{{ post.url }}#disqus_thread"></a></small></p>
{% endfor %}