Skip to content

Instantly share code, notes, and snippets.

View uetchy's full-sized avatar
🍵
Recovering

uetchy uetchy

🍵
Recovering
View GitHub Profile
@uetchy
uetchy / add_to_feedly.js
Created March 15, 2014 21:39
Add to Feedly(contains relative uri support)
javascript:(function(){void (d=document);void (el=d.getElementsByTagName("link"));void (count=0);for(i=0;i<el.length;i++){if(el[i].getAttribute("rel").indexOf("alternate")!=-1){if(count==0){ty=el[i].getAttribute("type");if(ty.indexOf("application/rss+xml")!=-1||ty.indexOf("text/xml")!=-1){h=el[i].getAttribute("href");if(h.indexOf("comments")==-1){if(h.indexOf("/")==0){window.open("http://www.feedly.com/home#subscription/feed/"+location.protocol+"//"+location.host+h,"_blank")}else{window.open("http://www.feedly.com/home#subscription/feed/"+h,"_blank")}}}}count++}}void 0})()
@uetchy
uetchy / _instruction.md
Last active November 29, 2018 16:30
The build script for Gitlab and Jenkins on Docker wtih docker-gen(+ Dokku env).

Specification

  • Docker on Ubuntu
  • Gitlab container with Mailgun mailing support
  • nginx reverse-proxy with docker-gen

Prepare

Setup automatic reverse-proxy with docker-gen

@uetchy
uetchy / autholized_keys.sh
Created November 25, 2014 08:02
autholized_keys.sh
#!/bin/sh
GITHUB_USERS=(mochi udon soba)
DESTINATION=~/.ssh/authorized_keys
rm -rf "$DESTINATION"
for user in ${GITHUB_USERS[@]}
do
curl -L https://github.com/${user}.keys >> "$DESTINATION"
@uetchy
uetchy / brew-smash.sh
Created December 3, 2014 13:36
brew-smash
#!/bin/sh
# Usage: brew smash app-name
if [ -z "$1" ] ; then
echo "Usage: brew smash app-name"
exit 1
fi
if [ ! -d "Casks" ] ; then
KEEP_CLEAN=true
@uetchy
uetchy / platformio.rb
Last active February 27, 2016 11:21
Platform.IO Homebrew Formula
class Platformio < Formula
desc "An open source ecosystem for IoT development"
homepage "http://platformio.org"
url "https://pypi.python.org/packages/source/p/platformio/platformio-2.8.4.tar.gz"
sha256 "5728bee3281a10e33f4727da0cdb3f7b1f333fd415fdbbde6ad1591a963344b5"
depends_on :python if MacOS.version <= :snow_leopard
resource "bottle" do
url "https://pypi.python.org/packages/source/b/bottle/bottle-0.12.9.tar.gz"
@uetchy
uetchy / setup_tex.sh
Last active January 13, 2016 23:15
TeX for OS X
#!/bin/bash
brew cask install basictex
export PATH="/Library/TeX/texbin:$PATH"
sudo tlmgr update --self --all
sudo tlmgr install collection-langjapanese draftcopy
# tlmgr search —global foobar
@uetchy
uetchy / install_chainer.sh
Created January 14, 2016 12:34
Install chainer
#!/bin/bash
export PATH=/usr/local/cuda/bin:$PATH
export CPATH=/opt/cudnn/include
export LIBRARY_PATH=/usr/local/cuda/lib:/opt/cudnn/lib
export LD_LIBRARY_PATH=$LIBRARY_PATH
export DYLD_LIBRARY_PATH=$LIBRARY_PATH
LDFLAGS="-F/Library/Frameworks -framework CUDA" pip install --no-cache-dir chainer
@uetchy
uetchy / install.sh
Last active June 15, 2016 09:09
nv Install Script
#!/bin/bash
set -eu
GOOWNER=uetchy
GONAME=nv
GOTAG=v2.0.0
if [[ `uname -s` =~ ([Dd]arwin|mac os x) ]]; then
GOOS="darwin"
@uetchy
uetchy / 01_install_cuda_cudnn.sh
Last active June 14, 2017 06:13
CUDA on macOS
# install CUDA 8.0
brew cask install cuda
## add alias for libcuda.dylib to suppress the issue related to TensorFlow - https://github.com/tensorflow/tensorflow/issues/3263
sudo ln -s /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/libcuda.1.dylib
# install cuDNN 5.1
# get cuDNN from https://developer.nvidia.com/rdp/cudnn-download
tar xzf cudnn-8.0-osx-x64-v5.1.tgz
sudo cp cuda/include/cudnn.h /Developer/NVIDIA/CUDA-8.0/include
@uetchy
uetchy / cc_analysis.ipynb
Last active June 21, 2017 12:34
cc_analysis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.