Skip to content

Instantly share code, notes, and snippets.

View akiatoji's full-sized avatar
🕋
Currently traveling in time.

Aki Atoji akiatoji

🕋
Currently traveling in time.
  • TARDIS
View GitHub Profile
@akiatoji
akiatoji / debug-scroll.md
Created June 2, 2020 15:54 — forked from cuth/debug-scroll.md
Find the elements that are causing a horizontal scroll. Based on http://css-tricks.com/findingfixing-unintended-body-overflow/

Debug Horizontal Scroll

(function (d) {
    var w = d.documentElement.offsetWidth,
        t = d.createTreeWalker(d.body, NodeFilter.SHOW_ELEMENT),
        b;
    while (t.nextNode()) {
        b = t.currentNode.getBoundingClientRect();
 if (b.right > w || b.left < 0) {
@akiatoji
akiatoji / vagrant.org
Created June 6, 2012 17:45
CentOS 6.2 Box for Vagrant

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 / SpeedupSynologyExpansion.sh
Last active February 8, 2018 00:17 — forked from stevenharman/expanding_raid_5_array.sh
Improving RAID Initialization and Expansion time on Synology DS418play
# 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 January 9, 2018 01:57 — forked from smitshilu/Tensorflow_Build_GPU.md
Tensorflow 1.4 Mac OS High Sierra 10.13 GPU Support

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
Getting started
===============
# Make sure you have ggplot2 installed
install.packages("ggplot2")
library(ggplot2)
Basic examples
==============
@akiatoji
akiatoji / start-mongo-replset.sh
Created November 15, 2015 05:06 — forked from leetreveil/start-mongo-replset.sh
Shell scripts to create a mongodb replica set and sharded cluster locally
#!/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)
@akiatoji
akiatoji / precompile_assets.textile
Created April 11, 2012 06:42 — forked from kathgironpe/precompile_assets.textile
Rails 3.1: Precompile Assets for Cloudfront/CDN support

Naming files and using asset_path

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

on config/environments/production.rb

@akiatoji
akiatoji / Gemfile
Created April 7, 2012 03:34 — forked from simi/Gemfile
Refinery + Twitter Bootstrap WIP
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
#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 March 31, 2012 13:53 — forked from erikh/hack.sh
OSX For Hackers
#!/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
#