As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env bash | |
set -e | |
cd | |
case "$OSTYPE" in | |
darwin*) DOWNLOAD=https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh ;; | |
linux*) DOWNLOAD=https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh ;; | |
*) echo "unknown: $OSTYPE" ;; | |
esac |
extension UIImage { | |
/** | |
Returns a new `UIImage` with an adjusted exposure value. | |
- Parameter ev: The amount to adjust the exposure value. Negative for darker, positive for lighter. | |
- Returns: a new `UIImage` with an adjusted exposure value. | |
*/ | |
func imageWithAdjustedExposure(ev: Double) -> UIImage? { | |
guard let cgImage = self.CGImage else { return nil } |
function refreshData() | |
{ | |
x = 5; // 5 Seconds | |
// Do your thing here | |
setTimeout(refreshData, x*1000); | |
} | |
As configured in my dotfiles.
start new:
tmux
start new with session name:
library(quantmod) | |
symbols = c('A', 'AAPL', 'ADBE', 'AMD', 'AMZN', 'BA', 'CL', 'CSCO', 'EXPE', 'FB', 'GOOGL', | |
'GRMN', 'IBM', 'INTC', 'LMT', 'MSFT', 'NFLX', 'ORCL', 'RHT', 'YHOO') | |
start = as.Date("2014-01-01") | |
until = as.Date("2014-12-31") | |
# Grab data, selecting only the Adjusted close price. | |
# | |
stocks = lapply(symbols, function(symbol) { |
# The commands below are a guide to remove a large file that has been | |
# accidentally committed to a Git repository's history. If the file is | |
# larger than 100 MB, GitHub will prevent you from pushing your latest | |
# commits. The annotated steps below should help you remove the large | |
# file from your commit history, even if you've made new commit since. | |
# Some Git users advise against rebasing. You can safely use it here | |
# because you haven't published your changes yet. | |
# So, you first need to rebase your current branch onto the point that |
// JS array equivalents to C# LINQ methods - by Dan B. | |
// Here's a simple array of "person" objects | |
var people = [ | |
{ name: "John", age: 20 }, | |
{ name: "Mary", age: 35 }, | |
{ name: "Arthur", age: 78 }, | |
{ name: "Mike", age: 27 }, | |
{ name: "Judy", age: 42 }, | |
{ name: "Tim", age: 8 } |