Skip to content

Instantly share code, notes, and snippets.

View wittawasw's full-sized avatar

Wittawas W wittawasw

View GitHub Profile
build-essential libncursesw5-dev libreadline-gplv2-dev libssl-dev libgdbm-dev libc6-dev libsqlite3-dev libbz2-dev libffi-dev zlib1g zlib1g-dev liblzma-dev
{
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/vendor/bundle/*/**": true,
"node_modules/*/**": true,
"vendor/bundle/*/**": true,
"**/.bundle/*/**": true,
"**/tmp/*/**": true,
build-essential pkg-config libglib2.0-dev-bin libexpat1-dev libtiff5-dev libjpeg-turbo8-dev libjpeg-turbo8-dev libexif-dev libgif-dev librsvg2-dev libpoppler-glib-dev libgsf-1-dev libtiff5-dev libfftw3-dev liblcms2-dev libpng-dev liborc-0.4-dev libmagickwand-dev libpango1.0-dev libmatio-dev libopenslide-dev libcfitsio-dev libwebp-dev libopenexr-dev libnifti-dev gtk-doc-tools gobject-introspection swig
@wittawasw
wittawasw / Dockerfile-redis
Last active June 20, 2018 05:11
Source from redis-ml and neural-redis repo.
FROM redis:latest as builder
ENV LIBDIR /var/lib/redis/modules
ENV DEPS "libatlas-base-dev python python-setuptools python-pip wget unzip build-essential git"
# Set up a build environment
RUN set -ex;\
deps="$DEPS";\
apt-get update; \
apt-get install -y --no-install-recommends $deps;\
@wittawasw
wittawasw / character_set_and_collation.rb
Created April 18, 2017 03:50 — forked from tjh/character_set_and_collation.rb
Convert all Rails table column collation and character set
#!/usr/bin/env ruby
# Put this file in the root of your Rails project,
# then run it to output the SQL needed to change all
# your tables and columns to the same character set
# and collation.
#
# > ruby character_set_and_collation.rb
DATABASE = ''
# INSTALL THE DEPENDENCIES
# Build tools:
sudo apt-get install -y build-essential cmake
# GUI (if you want to use GTK instead of Qt, replace 'qt5-default' with 'libgtkglext1-dev' and remove '-DWITH_QT=ON' option in CMake):
sudo apt-get install -y qt5-default libvtk6-dev
# Media I/O:
sudo apt-get install -y zlib1g-dev libjpeg-dev libwebp-dev libpng-dev libtiff5-dev libjasper-dev libopenexr-dev libgdal-dev
FROM alpine:3.4
##################### Base dependencies #################################
RUN apk --no-cache add ruby ruby-irb ruby-json git ruby-bigdecimal ruby-rake \
ruby-io-console ruby-bundler libstdc++ tzdata postgresql-client nodejs \
libxml2 libxslt libgcrypt sqlite-libs pcre curl postgresql bash procps openssh \
&& cp /usr/bin/pg_dump /usr/bin/pg_restore /tmp/ \
&& apk del --purge postgresql \
&& mv /tmp/pg_dump /tmp/pg_restore /usr/bin/ \
&& echo "gem: --no-document" > /etc/gemrc
module PresentationsHelper
def topics_nav
TopicsNav.new(view: self, topics: @topics_nav).html
end
end
module PresentationsHelper
class TopicsNav
def initialize(view:, topics:)
@wittawasw
wittawasw / .vimrc
Last active November 22, 2017 11:22
my .vimrc
set nu
set autoindent
set incsearch
set smarttab
set ttyfast
set nowrap
set showcmd
set tabstop=2
set shiftwidth=2
set expandtab
@wittawasw
wittawasw / redis.md
Created August 22, 2016 22:08 — forked from diegopacheco/redis.md
How to Install Redis 3 Amazon Linux OS / CentOS

Install Redis cluster on Amazon Linux OS

sudo yum -y upgrade
sudo yum install -y gcc*
sudo yum install -y tcl
sudo wget http://download.redis.io/releases/redis-stable.tar.gz
sudo tar xzf redis-stable.tar.gz
cd redis-stable
cd deps ; sudo make hiredis jemalloc linenoise lua ; cd ..