Skip to content

Instantly share code, notes, and snippets.

View sixhat's full-sized avatar

Dave sixhat

View GitHub Profile
@sixhat
sixhat / gist:6d710ab9f6d086eba50a4dbe15120a9c
Created November 13, 2023 17:53
Create and Manage project folders with bash
#!/bin/bash
set -euo pipefail
__usage="usage: new_project name <type>
type can be one of md, r, or any other... and accordingly it should open
and setup different folder structures
name will be the folder name where the project exists.
"
#!/bin/bash
set -euo pipefail
__usage="usage: new_project name <type>
type can be one of md, r, or any other... and accordingly it should open
and setup different folder structures
name will be the folder name where the project exists.
"
// Particles - Move around
// When meeting other Particles
// Reproduce or Fight
ArrayList <Borg> borgs;
void setup() {
size(600, 600);
borgs = new ArrayList();
for (int i = 0; i<150; i++) {
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<style>
* {box-sizing: border-box;}
body{ background: #ddd;
display: grid;
@sixhat
sixhat / karabiner.json
Last active June 17, 2018 16:02
My June 2018 karabiner.json file
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketException;
import java.util.HashMap;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
public class JogoDoGalo implements Tabuleiro {
private ArrayList<String> jogadores;
private int[] board;
private String turno;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.util.InputMismatchException;
import java.util.Scanner;
public class Player {
private final static String FMT_PRINT = "%d %d %d";
private Scanner input;
import java.rmi.Remote;
import java.rmi.RemoteException;
public interface Tabuleiro extends Remote {
int[] play(int pos, String nome) throws RemoteException;
int[] getBoard(String nome) throws RemoteException;
boolean jogoEstaValido() throws RemoteException;
}
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;
public class BoardServer implements Board {
private ArrayList<String> jogadores;
private String turno;