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
@akiatoji
akiatoji / SpeedupSynologyExpansion.sh
Last active Feb 8, 2018 — forked from stevenharman/expanding_raid_5_array.sh
Improving RAID Initialization and Expansion time on Synology DS418play
View SpeedupSynologyExpansion.sh
# Initializing DS418play with 4 x 6TB disks
# ssh to NAS as yourseld
# Check the RAID block device and tunable values
cat /proc/mdstat # was md2. Getting about 30M/s
# Get original values:
echo "speed_limit_max: `cat /proc/sys/dev/raid/speed_limit_max`" #=> 200000
@akiatoji
akiatoji / Tensorflow_Build_GPU.md
Last active Jan 9, 2018 — forked from smitshilu/Tensorflow_Build_GPU.md
Tensorflow 1.4 Mac OS High Sierra 10.13 GPU Support
View Tensorflow_Build_GPU.md

Tensorflow

This allows my Convolutional Neural Network to be trained tad little faster on 2013 MacBookPro15 (4core i7/16GB + NVidia GT750M/2GB) than a 2016 MacPro (6Core Xeon/32GB).

System information

  • OS - High Sierra 10.13
  • Tensorflow - 1.4
  • Xcode command line tools - 8.2 (Download from Xcode - Support - Apple Developer) sudo xcode-select --switch /Library/Developer/CommandLineTools & clang -v
@akiatoji
akiatoji / start-mongo-replset.sh
Created Nov 15, 2015 — forked from leetreveil/start-mongo-replset.sh
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)
View co_wrap.lua
-- Reimplemented coroutine.wrap, returning "nil, err" if the coroutine cannot
-- be resumed.
local co_wrap = function(func)
local co = coroutine.create(func)
ngx.log(ngx.DEBUG, "co created with status ", coroutine.status(co))
return function(...)
if coroutine.status(co) == "suspended" then
return select(2, coroutine.resume(co, ...))
else
return nil, "can't resume a " .. coroutine.status(co) .. " coroutine"
View examples.r
Getting started
===============
# Make sure you have ggplot2 installed
install.packages("ggplot2")
library(ggplot2)
Basic examples
==============
@akiatoji
akiatoji / vagrant.org
Created Jun 6, 2012
CentOS 6.2 Box for Vagrant
View vagrant.org

Installing CentOS

Download net install iso: CentOS-6.2-x86_64-netinstall.iso

Create a new VirtualBox machine

  • Name: vagrant-centos
  • Operating System: Linux
  • Version: Red Hat
@akiatoji
akiatoji / precompile_assets.textile
Created Apr 11, 2012 — forked from kathgironpe/precompile_assets.textile
Rails 3.1: Precompile Assets for Cloudfront/CDN support
View precompile_assets.textile

Naming files and using asset_path

application.scss.erb
- use <%= asset_path 'background.jpg' %>

on config/environments/production.rb

@akiatoji
akiatoji / Gemfile
Created Apr 7, 2012 — forked from simi/Gemfile
Refinery + Twitter Bootstrap WIP
View Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
View Installing RVM + Ruby + Rails + Passenger + nginx on CentOS
#Steps to install RVM + Ruby 1.9.2 + Rails + nginx + Passenger on CentOS (tested on v5.5)
# Install git and curl, if not already installed
sudo yum install git
sudo yum install curl
# Create the rvm group and add any users who will be using rvm to the group
sudo su -
groupadd rvm
@akiatoji
akiatoji / hack.sh
Created Mar 31, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
You can’t perform that action at this time.