Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View denvazh's full-sized avatar

Denis Vazhenin denvazh

  • Tokyo
View GitHub Profile
@denvazh
denvazh / INSTALL.md
Created November 24, 2015 07:14
Ruby development environment with rbenv and bundler

Ruby

Rbenv

Used to manage ruby environment, since it is more beneficial and clean to use non-system one.

Install rbenv and ruby-build

@denvazh
denvazh / README.md
Created February 22, 2015 04:18
Generate ios icon settings for cordova.xml

How to use

This script assumes cordova application uses app/res/icons/ios directory for icon assets.

  • Install appicon_generate gem using bundler (refer to this)
    • Put gen_xml.rb in the same directry with Gemfile
  • Use appicon_generate to generate icons for ios
  • Run ./gen_xml.rb to generate related xml tags

Sample output:

@denvazh
denvazh / Dockerfile
Created January 6, 2015 08:26
Forcing japanese locale for Scala docker container
FROM williamyeh/scala
RUN \
echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen && \
dpkg-reconfigure -f noninteractive locales
ENV LANG ja_JP.UTF-8
ENV LANGUAGE ja_JP.UTF-8
ENV LC_ALL ja_JP.UTF-8
@denvazh
denvazh / README.md
Last active March 17, 2023 16:38
Scheduled update for homebrew

Scheduled updates for homebrew

This two launchdaemon scripts provide scheduled updates and upgrade for homebrew packages.

It will run in the following way:

  • brew update every day at 12:10
  • brew upgrade every day at 12:20

How to install

@denvazh
denvazh / Gemfile
Last active August 29, 2015 14:01
Small example for conversion of file with kanji strings to csv file with corresponding readings in katakana, hiragana and romaji.
# A sample Gemfile
source "https://rubygems.org"
gem "natto"
gem "romaji"
@denvazh
denvazh / README.md
Last active August 29, 2015 13:57
Create new Rails application without installing Rails itself

Why?

This is just a small script to bootstrap Rails new application generation process.

Reason, why I don't use rails new as it is, because I don't want Rails to be installed at all :) What I really wanted to have is a way to create Rails application without installing Rails system-wide.

Typical configuration is done with rbenv ( to manage and install ruby ) and bundler ( which is the only gem I need to install manually system-wide ).

@denvazh
denvazh / gitlab
Last active September 6, 2019 03:43
Freebsd port of script to manage gitlab as system service.
#!/bin/sh
#
# Written by Denis Vazhenin <denis.vazhenin@me.com>
#
# This script was ported from Debian/Ubuntu version of start script for Gitlab:
# https://raw.github.com/gitlabhq/gitlabhq/master/lib/support/init.d/gitlab
#
# PROVIDE: gitlab
# REQUIRE: NETWORKING SERVERS DAEMON LOGIN
# KEYWORD: shutdown
@denvazh
denvazh / check.rake
Last active December 17, 2015 07:39
Currently, gitlab supports only Debian based OS where scripts are installed under /etc/init.d/ by default. Patches below has few improvements to the gitlab check and task_helper rake scripts to verify whether init script was installed on FreeBSD machine.
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index a57c349..3253e16 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -118,7 +118,7 @@ namespace :gitlab do
def check_init_script_exists
print "Init script exists? ... "
- script_path = "/etc/init.d/gitlab"
+ script_path = get_init_script_syspath