Posts
- 
      
Intro to R »
Things learned today:
- Emacs tutorial: M-x help-with-tutorial
 - Learning about R today to look at crude oil data over the past year. I wanted to see if there was an opportunity to invest in airlines after crude prices had started to fall.
 - File extensions aren’t necessary to run scripts (Python, R, etc.), they are a convention.
 - REPLs are useful for exploratory programming because of their quick feedback.
 - R Cheatsheet:
    
- q() - Quit REPL
 - list.files() - ls
 - source(“filename”) - Run program
 - install.packages(“packagename”), update.packages()
 - Assign variables via <-
 - c() - Create a new vector (array). Vector indices start at 1.
 - Rscript - Run program without entering REPL.
 - Graphs generated in the REPL appear immediately in Quartz, and from rscript are saved as PDFs.
 - RStudio seems like the best R-specific IDE right now. Ggplot2 is a good way to create visualizations.
 
 
 - 
      
You Don't Know JS »
Things learned today:
- Word of the day - mulct : to punish by fine.
    
- Ex: The ruler used an income tax primarily to mulct his subjects.
 
 - How to keep a cuff in jeans.
 - Bash command line practice from Coursera - Part 1 and part 2.
 - You don’t know JS - This and Object Prototypes
    
- Many programmers don’t fully understand how to use 
thisand fall back to reliance on lexical scope instead. 
 - Many programmers don’t fully understand how to use 
 
function foo(num) { console.log( "foo: " + num ); // keep track of how many times `foo` is called data.count++; } var data = { count: 0 };- An alternative is to use 
this.count++;and to call the function viafoo.call( foo, i );, which forcesthisto point at the function object. 
 - Word of the day - mulct : to punish by fine.
    
 - 
      
More Unix and CSS »
Things learned today:
- Bash guide from startup engineering on Coursera
 - The typical place to store custom bash scripts is usr/local/bin.
 - chmod 755 to reserve write access for the user and make executable.
 - Script created: zippy (to unzip/extract anything).
 - Auto-complete sudo and man, colorize ls and grep.
 - Benefit of using tmux (or screen) - terminal sessions become persistent until you shut down.
 - Karen in Californication - “They’re just words - I know you mean them, but I don’t know what they mean to you.”
 - Flexbox documentation - supposed to make aligning stuff easier.
 - Clearfix for positioning stubborn divs.
 - Percentage heights are tricky to use in CSS. Vertically aligning content can also be difficult.
 - jQuery Mobile makes working with layout very difficult. Alternative flipswitches here.
 - Setting and getting cookies with javascript. *Made something to help my parents pick somewhere to eat for dinner.
 
 - 
      
Powershell and Unix Tips »
Things learned today:
- More on Powershell from Microsoft’s training course:
    
- You can use Powershell for remote servers on mobile devices using Powershell Web Application.
 - The reason that you need .\ScriptName to run a script within a directory is to prevent attacks. In the old days of Unix, attackers would create scripts such as “pwd” that would execute when run within a directory.
 - The Powershell community is very strong and helpful. Try asking questions on Powershell.org or on Twitter (#PowerShell).
 - Implicit remoting allows you to run cmdlets on different servers all locally.
 - Using icm with sessions allows you to issue commands to many computers at once remotely.
 
 - Contract templates for freelancing.
 - From Unix tutorial:
    
- Command substitution allows you to run a command and store the output to a variable or use it as an argument. Syntax: $(command)
 - Process substitution allows a command to appear as a file. Syntax: <(command)
 - Piping to grep allows you to quickly find a certain word or phrase in a file.
 - Awk and sed are good for simple parsing or text manipulation problems. The author only uses sed to replace text or delete lines.
 
 
 - More on Powershell from Microsoft’s training course:
    
 - 
      
Birthday »
Things learned today:
- The best way to come up with a startup idea - How is the world changing and what can I do about it?
 - Old people’s voices sound different because of changes in hormone levels, physiological changes in muscles that affect vocal cords, smoking, and chronic dehydration. This is called presbyphonia.
 - Don’t agree to something because it is distant.
 - Harry Potter and the Methods of Rationality
 - Getting Started with Flux
 - Contributing to Chromium
 - Python Style Guide
 - SVG Animation
 - Lessons in Becoming Great
    
- Persistence is a key to succeeding creatively
 - Find people doing cool stuff and help them out
 
 - Resources for learning Scala
    
- Coursera - Functional Programming in Scala
 - Twitter’s Scala School
 
 - Putting name into top of terminal - ASCII Generator
    
- Favorites: Slant Relief, Sub-Zero, Twisted, 3D-ASCII, Block, Broadway, Colossal, Fractur, NV Script, Roman, X992
 - Use the Test All button to see them all at the same time. Winner is Colossal.
 - Message is stored in /etc/motd.