Skip to content

Instantly share code, notes, and snippets.

@webon100
webon100 / tensorflow_cuda_osx.md
Created February 19, 2017 09:46 — forked from Mistobaan/tensorflow_cuda_osx.md
How to enable cuda support for tensor flow on Mac OS X (Updated on April:2016 Tensorflow 0.8)

These instructions will explain how to install tensorflow on mac with cuda enabled GPU suport. I assume you know what tensorflow is and why you would want to have a deep learning framework running on your computer.

Prerequisites

Make sure to update your homebrew formulas

brew update
@webon100
webon100 / Base64SHA1Hash.java
Created December 9, 2016 17:30 — forked from abhinavguptas/Base64SHA1Hash.java
Apex(Salesforce): Generating base-64 SHA1 Hash for Rackspace API Signature Headers
//Example String to be passed for SHA1 hash generation
String targetString = 'eGbq9/2hcZsRlr1JV1PiRackspace Management Interface20010308143725QHOvchm/40czXhJ1OxfxK7jDHr3t';
// Convert to BLOB
Blob targetBlob = Blob.valueOf(targetString);
// Generate SHA1 digest
Blob hashSHA1 = Crypto.generateDigest('SHA1', targetBlob);
// For Rackspace Compatiblity encode the binary into BASE 64
// this will result in 28 chars long string
String hashBase64SHA1 = EncodingUtil.base64encode (hashSHA1);
// should print : "46VIwd66mOFGG8IkbgnLlXnfnkU="
@webon100
webon100 / nginx.conf
Created November 23, 2016 17:18 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@marcuslilja
marcuslilja / ubuntu-server-setup-16.04.md
Last active July 13, 2025 02:03
Server setup for Ubuntu 16.04 on Digital Ocean

Server setup for Ubuntu 16.04 on Digital Ocean

The setup installs the following software:

  • Nginx
  • MySQL
  • PHP
  • Node
  • Composer
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active April 14, 2025 11:07
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh