Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Aki Atoji akiatoji

🏠
Working from home
  • TARDIS
Block or report user

Report or block akiatoji

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@smitshilu
smitshilu / Tensorflow_Build_GPU.md
Last active Jul 24, 2019
Tensorflow 1.4 Mac OS High Sierra 10.13 GPU Support
View Tensorflow_Build_GPU.md

Tensorflow

System information

  • OS - High Sierra 10.13
  • Tensorflow - 1.4
  • Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
  • Cmake - 3.7
  • Bazel - 0.7.0
@derwiki
derwiki / README.md
Last active May 14, 2018
Ruby module that you can use in a `before_action` on sensitive controllers for which you'd like a usage audit trail
View README.md

Adding an audit log to your Rails app

If you have any sort of administrative interface on your web site, you can easily imagine an intruder gaining access and mucking about. How do you know the extent of the damage? Adding an audit log to your app is one quick solution. An audit log should record a few things:

  • controller entry points with parameter values
  • permanent information about the user, like user_id
  • transient information about the user, like IP and user_agent

Using the Rails framework, this is as simple as adding a before_action to your admin controllers. Here’s a basic version that I’m using in production.

@leetreveil
leetreveil / start-mongo-replset.sh
Last active Nov 5, 2019
Shell scripts to create a mongodb replica set and sharded cluster locally
View start-mongo-replset.sh
#!/bin/bash
# shell script to create a simple mongodb replica set (tested on osx)
set -e
red=$(tput setaf 1)
green=$(tput setaf 2)
yellow=$(tput setaf 3)
default=$(tput sgr0)
@granturing
granturing / HCatInputFormat.java
Last active Sep 28, 2016
HCatalog InputFormat wrapper to use with Spark (FYI for those finding this now, this was originally written pre-SparkSQL)
View HCatInputFormat.java
public class HCatInputFormat extends InputFormat<SerializableWritable<Writable>, HCatRecord> {
private final org.apache.hcatalog.mapreduce.HCatInputFormat input;
public HCatInputFormat() {
input = new org.apache.hcatalog.mapreduce.HCatInputFormat();
}
@Override
public RecordReader<SerializableWritable<Writable>, HCatRecord> createRecordReader(
@wch
wch / examples.r
Created Mar 6, 2013
Examples for O'Reilly Webinar on Data Visualization with R and ggplot2
View examples.r
Getting started
===============
# Make sure you have ggplot2 installed
install.packages("ggplot2")
library(ggplot2)
Basic examples
==============
You can’t perform that action at this time.