Skip to content

Instantly share code, notes, and snippets.

View hernamesbarbara's full-sized avatar

austin hernamesbarbara

View GitHub Profile
[
{
"data": [
"David Moore, a wealthy Manhattanite, comes rushing into the lobby of his apartment building, carrying his comatose wife Joan in his arms."
]
}
]
bootstrap.list <- c("car",
"codetools",
"colorspace",
"data.table",
"devtools",
"dplyr",
"forecast",
"ggplot2",
"knitr",
"lattice",

Show full directory path in Mac OS X Finder window

Follow the steps below to display the full file path within Finder window title bars as you navigate your mac.

defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
{
"default_encoding": "UTF-8",
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"font_face": "Consolas",
"font_size": 13,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages": [
"Vintage"
[
{
"keys": [
"alt+minus"
],
"command": "insert",
"args": {
"characters": " <- "
},
"context": [
@hernamesbarbara
hernamesbarbara / lm.js
Last active August 29, 2015 13:56
simple linear regression in javascript
var _ = require('underscore');
function simple_linear_regression (x, y) {
var sum_x = 0
, sum_y = 0
, sum_xy = 0
, sum_xx = 0
, cnt = 0
, nrow = x.length
, m = null
#!/bin/bash
echo COCKTAIL GLASS > drinks.txt
echo -e "\xf0\x9f\x8d\xb8" >> drinks.txt
echo TROPICAL DRINK >> drinks.txt
echo -e "\xf0\x9f\x8d\xb9" >> drinks.txt
echo BEER MUG >> drinks.txt
echo -e "\xf0\x9f\x8d\xba" >> drinks.txt
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pandas as pd
sample = """user_id,website 1 name,website 1 value,website 2 name,website 2 value,website 3 name,website 3 value
'000001,linkedin,https://linkedin.com/245563,github,https://github.com/926850,,
'000002,facebook,https://facebook.com/976099,,,,
'000003,twitter,https://twitter.com/612711,,,linkedin,https://linkedin.com/840609
'000004,github,https://github.com/220993,blog,https://blog.com/201188,linkedin,https://linkedin.com/479351
'000005,,,twitter,https://twitter.com/897816,,
#!/usr/bin/osascript
(* subroutine to bring an application to front.
you could invoke it from an alias in your
~/.bash_profile, another script or an alfred workflow
*)
property default_app : ""
on bring_to_front(app_name)
set res to false