- & - run a program (path may contain spaces)
- man
- ls
- cd
- pushd/popd
- mkdir
- cp
- mv
- rm
- cat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <iostream> | |
#include <cmath> | |
const int WIDTH = 300; | |
const int HEIGHT = 300; | |
void save_img(int *red[], int *green[], int *blue[]); | |
void create_img(float *red[], float *green[], float *blue[], int pixelsPerUnit); | |
void print_img(float *red[], float *green[], float *blue[]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function extract { | |
cmd=$1 | |
filename=$2 | |
fullname=$3 | |
echo "$fullname" | |
mkdir "$filename" | |
cd "$filename" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'scala' | |
apply plugin: 'application' | |
mainClassName = 'App' | |
version = 'alpha' | |
repositories { | |
jcenter() | |
} | |
dependencies { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.math.{round, ceil, random} | |
//val pattern = """(\d*)d(%|\d+)(([*/])(\d+))?([+-]\d+)?""".r | |
val fullPattern = """(\d*d(%|\d+))(r[hl<>]?\d+)?(k[hl<>]?\d+)?(s[hl<>]?\d+)?([*/]\d+)?([+-]\d+)?""".r | |
val dicePattern = """(\d*)d(%|\d+)""".r | |
val rerollPattern = """r([hl<>]?)(\d+)""".r | |
val keepPattern = """k([hl<>]?)(\d+)""".r | |
val scrapPattern = """s([hl<>]?)(\d+)""".r | |
val multiplierPattern = """([*/])(\d+)""".r | |
val bonusPattern = """([+-]\d+)""".r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.annotation.tailrec | |
abstract class Suit { val value: Int } | |
case object Clubs extends Suit { val value = 0 } | |
case object Diamonds extends Suit { val value = 1 } | |
case object Hearts extends Suit { val value = 2 } | |
case object Spades extends Suit { val value = 3 } | |
abstract class Rank { val value: Int } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.swing.SwingBuilder | |
import java.awt.BorderLayout as BL | |
import javax.swing.JFrame | |
final int COUNT = 20 | |
xs = [] | |
ys = [] | |
ops = [] | |
results = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Color | |
import java.awt.Graphics2D | |
import java.awt.image.BufferedImage | |
import javax.imageio.ImageIO | |
Red = new Color(255, 0, 0) | |
Green = new Color(0, 255, 0) | |
Blue = new Color(0, 0, 255) | |
Orange = new Color(255, 165, 0) | |
Yellow = new Color(255, 255, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.swing.SwingBuilder | |
import java.awt.BorderLayout as BL | |
import javax.swing.JFrame | |
import javax.swing.ImageIcon | |
import java.awt.Color | |
import java.awt.Graphics2D | |
import java.awt.image.BufferedImage | |
import javax.imageio.ImageIO | |
import javax.swing.SwingUtilities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<sstream> | |
int main(int argc, char** argv){ | |
union mytypes_t { | |
int i; | |
float f; | |
} mytypes; | |
int in_i = 5; | |
float in_f = 5.0; |
NewerOlder