On Nginx
adduser ben
gpasswd -a ben sudo
su - ben
mkdir .ssh
chmod 700 .ssh
vim .ssh/authorized_keys # add person key to file
vim /etc/ssh/sshd_config: PermitRootLogin no
sudo apt-get update
# basic data setup | |
library(ggplot2) | |
d <- read.csv('/Users/ben/Documents/hampshire/S2015/collapse_phenomena/resistance.csv', header = TRUE, sep = ",") | |
load("/Users/ben/Downloads/drugs/DS0001/34933-0001-Data.rda") | |
d <- read.table('/Users/ben/Downloads/adolescenthealth/DS0001/21600-0001-Data.tsv', sep='\t', header=TRUE) | |
data <- da34933.0001 # store the dataframe in an easily accessible variable | |
# Convert to actual numerical variables | |
library(prettyR) | |
lbls <- sort(levels(data$PSILCY)) |
adduser ben
gpasswd -a ben sudo
su - ben
mkdir .ssh
chmod 700 .ssh
vim .ssh/authorized_keys # add person key to file
vim /etc/ssh/sshd_config: PermitRootLogin no
sudo apt-get update
Tonight I decided to set something interesting to happen every time I open the Terminal. | |
I decided to use cowsay (http://www.nog.net/~tony/warez/cowsay.shtml) | |
and fortune (http://en.wikipedia.org/wiki/Fortune_(Unix) to have a "cow" (kitten in my case) | |
give out random quotes from Portal, the Hitchhiker's Guide to the Galaxy and Monty Python and the Holy Grail. | |
I was successful, and decided to share my method. | |
First, you should install both programs: | |
brew install fortune | |
brew install cowsay |
# Restaurbot | |
$done = false | |
orders = [ | |
'pizza', 'macaroni' | |
] | |
puts 'Hello. What is your name?' | |
$name = gets.chomp.capitalize |
#!/bin/bash | |
open -A /Applications/iA\ Writer.app/ $1 |
// name: | |
// purpose: determine minimum age of a possible date | |
import java.util.Scanner; // imports the "Scanner" library, which allows the program to set up a new Scanner object | |
public class BBaileyDateable | |
{ | |
// method main(): program starting point | |
public static void main( String[] args ) | |
{ |
import java.util.*; | |
import java.awt.*; | |
import java.io.*; | |
/** | |
* Class that represents a turtle which is similar to a Logo turtle. | |
* This class inherts from SimpleTurtle and is for students | |
* to add methods to. | |
* | |
* Copyright Georgia Institute of Technology 2004 |
public class TurtleRunner | |
{ | |
public static void main(String args[]) | |
{ | |
//create a world for your turtles | |
World turtleWorld = new World(600,800); //creates the turtle canvas | |
//create a picture | |
Picture turtle = new Picture("images.jpg"); //lets java know where the picture is |
// name: | |
// purpose: demonstrate further method prowess | |
public class BBaileyInvoke | |
{ | |
// method piggyBank(): returns what the change is worth in cents | |
public static int piggyBank(int pennies, int nickles, int dimes, int quarters, int halfDollars) //creates the piggyBank method, which takes the arguments pennies, nickles, dimes, quarters, and halfDollars | |
{ | |
double money = (pennies *.01) + (nickles*.05) + (dimes*.1) + (quarters*.25) + (halfDollars*.5); //calculates the amount of money needed |