The book.
The author Ari Lerner is a Founder of FullStack. He also authored/co-authored:
He co-manages:
import requests | |
consumer_key = "YOUR_CONSUMER_KEY" | |
consumer_secret = "YOUR_CUSTOMER_SECRET" | |
username = "YOUR_USER_NAME" | |
password = "YOUR_PASSWORD" | |
payload = { | |
'grant_type': 'password', | |
'client_id': consumer_key, |
The book.
The author Ari Lerner is a Founder of FullStack. He also authored/co-authored:
He co-manages:
- Check rails version | |
$ rails -v | |
- To update rails | |
$ gem update rails | |
- Creating a new rails app using postgresql | |
$ mkdir rails_projects | |
$ cd rails_projects | |
$ rails new myapp --database=postgresql |
/** | |
* This is a very simple example of an ember component to integrate | |
* nnick/chart.js in an ember.js application. Basically, it is simply | |
* using the components hook to create a ChartJS canvas element. | |
* Additionally, it supports an update property that allows you to | |
* let the chart re-rendet if your data or options change. Chart.js | |
* doesn't support updating its data so this will just create a new | |
* chart on the given canvas. | |
* | |
* Example usage in a handlebars template: |
This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.
Most the credit for these changes go to Dave Holland.
#' ## Storing R Objects in a SQLite Database | |
#' Two packages we are using. The first is the ```RSQLite``` which will be used to create and manage an in-memory SQLite database. The second is ```igraph``` which I will use to create and visualize a random network. Some of the work I do is on network simulation. I often don't know the metrics I need from a simulated network when it's created, so I want to be able to store the networks that are created so that I can go back later and analyze them. | |
library(RSQLite) | |
library(igraph) | |
#' Create a database in memory. | |
con <- dbConnect(SQLite(), ":memory:") | |
#' The table has two columns, an *id* column and a column called *graph* which is a **blob** type. This type just stores binary data. |
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL
####~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
### Cache (memoization) utilities | |
### | |
### Purpose | |
### * Functions to save the output of time consuming functions to memory and | |
### return results quickly if we already have the answers | |
### | |
### Notes: Standard usage would go like this | |
### FunctionName <- function(){ | |
### args <- c(as.list(environment()), list()) |
# get library path | |
lib <- .libPaths()[1] | |
# does it end in 3.3? | |
if (grepl("*3.3",lib)) { | |
# if yes then assume old library is same place with 3.2 instead | |
oldlib <- gsub("*3.3","3.2",lib) | |
} | |
# check that old library exists |
package rgremlin; | |
import org.apache.tinkerpop.gremlin.driver.*; | |
import org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0; | |
import org.apache.tinkerpop.gremlin.structure.Element; | |
import org.apache.tinkerpop.gremlin.structure.Vertex; | |
import org.apache.tinkerpop.gremlin.structure.io.gryo.GryoMapper; | |
import org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry; | |
import org.json.simple.JSONObject; |