Skip to content

Instantly share code, notes, and snippets.

@jda0
jda0 / .bashrc
Created September 9, 2017 06:30
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@jda0
jda0 / setup.sh
Last active February 28, 2018 06:27
#!/usr/bin/env bash
sudo apt update
sudo apt upgrade -y
sudo apt install curl wget git zip unzip -y
echo "Install all developer tools?"
select yn in "Yes" "No"; do
case $yn in
Yes ) sudo apt install -y build-essential cmake python-dev python3-dev golang-go nodejs
@jda0
jda0 / login.cpp
Last active September 21, 2017 03:51
#include <cstdio>
#include <cstring>
#include <cstdlib>
using namespace std;
void login1(char * input1, char * input2) {
struct {
char username[20];
char password[30];
char canary;
@jda0
jda0 / setup.bat
Created September 22, 2017 22:53
@echo off
set /p full="Do you have the Arduino IDE already installed? (y/N) "
@echo on
if /I "%full:~0,1%"=="y" (
echo "Hello"
xcopy /s/e/y Arduino\Windows\arduino-1.8.1 "%USERPROFILE%\Documents\arduino-1.8.1\"
)
xcopy /s/e/y Arduino15 "%USERPROFILE%\AppData\Local\Arduino15\"
$font-stack: "Inter UI", $font-fallback-stack;
$font-fallback-stack: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
$base-font-size: calc(100vw / 160 + 12px);
$ratio: 1.6;
@function pow($number, $exponent) {
$value: 1;
@if $exponent > 0 {
using System;
using System.Threading;
using System.Windows.Forms;
class Program {
static void Main() {
Console.WriteLine("Hello...");
try {
while (true) {
#ifdef _WIN32
#include <conio.h>
#else
#include <ncurses.h>
#endif
#include <stdio.h>
#include "palace.h"
@jda0
jda0 / chesslike.coffee
Created February 26, 2018 10:45
A chess-like prototyping toy from 19 August 2013
@VERSION = 288
__ = @
@sf = 32
@sz = 24
@mx = 7
@po = { px: 48, py: 48 }
@types = {
Bristol LOLCODE
===============
Author: James Daly (Dec 2016)
This document outlines a parser for a dialect of [LOLCODE][1], an
esoteric imperative language devised in 2007 by [Justin J. Mesa][2]
based on the ["lolspeak" or "chanspeak" language][3] from popular ["lolcats"][4]
and ["Can I Haz Cheezburger?"][5] memes and weblogs.
class Mastermind {
constructor() {
this.length = 4
this.chars = ['0', '1', '2', '3', '4', '5']
}
generate() {
this.guesses = 0
this.key = []
for (var i = 0; i < this.length; i++)