#Adding weather to your tmux status bar.
##Python file that writes the weather to a text file.
#!/Users/jhwhite/anaconda/bin/python
# -*- coding: utf-8 -*-
import forecastio
import math| .cover { | |
| background: url(images/bg.jpg) no-repeat center center fixed; | |
| -webkit-background-size: cover; | |
| -moz-background-size: cover; | |
| -o-background-size: cover; | |
| background-size: cover; | |
| } |
| # Based on gallifrey with a few small changes | |
| function collapse_pwd { | |
| echo $(pwd | sed -e "s,^$HOME,~,") | |
| } | |
| local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
| PROMPT='%{$fg[green]%}$(collapse_pwd) $(git_prompt_info)%{$reset_color%}%B➜ %b ' | |
| RPS1="${return_code}" |
| 1 set nocompatible " be iMproved, required | |
| 2 filetype off " required | |
| 3 | |
| 4 set number | |
| 5 syntax enable | |
| 6 set backspace=indent,eol,start | |
| 7 colorscheme distinguished | |
| 8 | |
| 9 " set the runtime path to include Vundle and initialize | |
| 10 set rtp+=~/.vim/bundle/Vundle.vim |
| library("ggplot2") | |
| library("dplyr") | |
| library("lubridate") | |
| library("grid") | |
| s3_files <- read.csv(file="s3.csv", head=FALSE) | |
| colnames(s3_files) <- c("date", "time", "size", "filename") | |
| s3_files$time <- hms(s3_files$time) | |
| s3_files$hour <- factor(hour(s3_files$time)) |
#Adding weather to your tmux status bar.
##Python file that writes the weather to a text file.
#!/Users/jhwhite/anaconda/bin/python
# -*- coding: utf-8 -*-
import forecastio
import mathimport requests
from pprint import pprint
headers = {
'ris-zip': '22911',
'Accept-Encoding': 'gzip, deflate, sdch',
'Accept-Language': 'en-US,en;q=0.8',
'ris-chash': '30390833f3a0f4d1075f160ef72ca96f',
'ris-appsig': 'b2145d17b741043a60a5ef2c360f2dee',| require 'forecast_io' | |
| require 'geocoder' | |
| require 'awesome_print' | |
| require 'open-uri' | |
| # Get public IP Address | |
| remote_ip = open('http://whatismyip.akamai.com').read | |
| #puts remote_ip | |
| # Get geo data based on IP |
| { | |
| "Parameters": { | |
| "KeyPair":{ | |
| "Description": "Key pair for instance", | |
| "Type": "AWS::EC2::KeyPair::KeyName" | |
| } | |
| }, | |
| "Resources": { | |
| "S3Bucket": { | |
| "Type" : "AWS::S3::Bucket", |
| #route | |
| get 'tasks/todos-total', to: 'tasks#total_todos' | |
| #tasks_controller | |
| class TasksController < ApplicationController | |
| before_action :set_task, only: [:show, :update, :destroy] | |
| # GET /tasks | |
| def index | |
| @tasks = Task.all |