- Go here: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
- Download the 64bit versions of instantclient-sqlplus, instantclient-sdk, instantclient-basic - the 32bit versions do not work with OSX 10.9
- Create directories at /opt/oracle
- Unzip instantclient-basic first, move to /opt/oracle (should add a folder - something like /opt/oracle/instantclient_11_2/)
- Unzip instantclient-sdk and move its contents to /opt/oracle/instantclient_11_2/
- Unzip instantclient-sqlplus and move its contents /opt/oracle/instantclient_11_2/
- Open Terminal (if you haven't already) and type...
- DYLD_LIBRARY_PATH=/opt/oracle/instantclient_11_2 export DYLD_LIBRARY_PATH
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint plusplus: true, vars: true, indent: 2 */ | |
/* | |
convertPointFromPageToNode(element, event.pageX, event.pageY) -> {x, y} | |
returns coordinate in element's local coordinate system (works properly with css transforms without perspective projection) | |
convertPointFromNodeToPage(element, offsetX, offsetY) -> {x, y} | |
returns coordinate in window's coordinate system (works properly with css transforms without perspective projection) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.Date.fuzzy = function(time, local){ | |
(!local) && (local = Date.now()); | |
if (typeof time !== 'number' || typeof local !== 'number') { | |
return; | |
} | |
var | |
offset = Math.abs((local - time)/1000), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Capture Photo</title> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/> | |
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
var pictureSource; // picture source | |
var destinationType; // sets the format of returned value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Assuming: | |
* dataview is a { xtype: "list" } | |
* dataview.itemTpl includes a <div class="deleteplaceholder"></div> | |
* | |
* Delete button will disappear as soon as something is touched | |
*/ | |
dataview.on("itemswipe", function(dataview, ix, target, record, event, options) { | |
if (event.direction == "left") { | |
var del = Ext.create("Ext.Button", { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# this script was initially written for Redhat/CentOS | |
# file is /etc/cron.daily/diskAlert.cron | |
# requires enabling outgoing sendmail from localhost to a valid | |
# smtp server, which is usually disabled by default | |
ADMIN="[email protected],[email protected]" | |
THRESHOLD=90 | |
df -PkH | grep -vE '^Filesystem|tmpfs|cdrom|media' | awk '{ print $5 " " $6 }' | while read output; | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'mechanize' | |
FIRST_NAME = 'FIRST_NAME' | |
LAST_NAME = 'LAST_NAME' | |
PHONE = 'PHONE' | |
EMAIL = '[email protected]' | |
PARTY_SIZE = 2 | |
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function topLevel() { | |
{ | |
{ | |
{ | |
{ | |
{ | |
{ | |
{ | |
// Pretty | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ChatGPT | |
# Ask ChatGPT questions from your terminal. Results are shown in terminal and markdown is formatted with `glow`. | |
# | |
# Requirements: | |
# 1. In terminal, run: `brew install jq glow` | |
# 2. Get your free API key here from: https://platform.openai.com/account/api-keys | |
# 3. Paste in your API key below. | |
# 3. Paste everything in this gist into your `.zshrc` file. Rename aliases to your liking. | |
# 4. Remember to source your `.zshrc` file using `source ~/.zshrc` or restart terminal for changes to take effect. | |
# |