Skip to content

Instantly share code, notes, and snippets.

@1v
1v / gist:10272479
Last active June 6, 2017 01:27 — forked from ancap/gist:7385992
Ruby on Rails installation on Ubuntu 12.04 LTS + Nginx + Puma

Ruby on Rails installation on Ubuntu 12.04 LTS + Nginx + Puma

Adding new user

Create new user:

sudo useradd -G sudo -m -s /bin/bash luna

blog.lunarlogic.io

Change password:

Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.04/x86_64/ruby-2.1.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system.................
Installing required packages: patch, gawk, g++, gcc, make, libc6-dev, patch, libreadline6-dev, zlib1g-dev, libssl-dev, libyaml-dev, libsqlite3-dev, sqlite3, autoconf, libgdbm-dev, libncurses5-dev, automake, libtool, bison, pkg-config, libffi-dev.........................
Requirements installation successful.
Installing Ruby from source to: /home/luna/.rvm/rubies/ruby-2.1.1, this may take a while depending on your cpu(s)...
ruby-2.1.1 - #downloading ruby-2.1.1, this may take a while depending on your connection...
Are you sure you wish to upgrade from ruby-2.0.0-p247 to ruby-2.1.1? (Y/n): y
Installing new ruby ruby-2.1.1
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/12.04/x86_64/ruby-2.1.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /home/luna/.rvm/rubies/ruby-2.1.1, this may take a while depending on your cpu(s)...
ruby-2.1.1 - #downloading ruby-2.1.1, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Чтобы узнать соответствие комбинаций и символов нужно в консоли набрать
C:\Users\root>chcp
Текущая кодовая страница: 866
Далее смотрим http://www.ascii-codes.com/cp866.html
▲ — в windows соответствует Alt + 30. Знак бесконечность набрать невозможно.
Еще можно charmap в консоли набрать (откроется окно и там он должен быть, поиск infinity).

Applied Electronics

The staff of the Department of Electrical Engineering at the Massachusetts Institute of Technology has for some years been engaged in an extensive program of revising as a unit its entire presentation of the basic technological principles of electrical engineering. This new edition of Applied Electronics covers a part of that presentation.

Read more: Applied Electronics

Basic Radio: The Essentials of Electron tubes and their Circuits

Electron tubes and circuits, with their Wide ramifications in radio and line communications, in industrial production and in research work, are so numerous and complex as to bewilder the beginner. He needs a guide which will present the important items in orderly sequence from the simple to the complex.

Read more: Basic Radio: The Essentials of Electron tubes and their Circuits

<?
header('Content-type: text/html; charset=utf-8');
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
echo "<pre>";
passthru("echo $HOME");
echo "<br>";
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
.tabbrowser-tab {
background-color: rgba(255, 255, 255, 0.0) !important;
margin-top: -1px !important;
}
.tabbrowser-tab[selected="true"] {
height: 26px !important;
margin-top: -1px !important;
@1v
1v / gist:a9f1417d40bae5c8b9d4
Last active August 29, 2015 14:01
MediaWiki Git Installation

Install git:

sudo aptitude install git

Clone from repo (in site root path):

cd www/site.ru/
git clone -b REL1_23 https://gerrit.wikimedia.org/r/p/mediawiki/core.git ./
user@comp:~/www/wiki.com/extensions/Math/math$ make
ocamlopt -c util.ml
ocamlc -c render_info.mli
ocamlc -c tex.mli
ocamlyacc parser.mly
9 shift/reduce conflicts.
ocamlc -c parser.mli
ocamlopt -c parser.ml
ocamlc -c html.mli
ocamlopt -c html.ml
$wgImageLimits = array(
array(320, 3000),
array(640, 3000),
array(800, 3000),
array(1024, 3000),
array(1280, 3000),
array(1600, 3000),
array(1900, 3000)
);
I want limit only images widths, so I setted all heights to 3000. Now if image height less than 3000 then "Other resolutions" on image page (like https://www.mediawiki.org/wiki/File:Astronotus_ocellatus.jpg) is not displaying (only original size), because of this part in ImagePage.php https://github.com/wikimedia/mediawiki-core/blob/a3983418d5748fbccdda15e0e48af90c50ef1f67/includes/ImagePage.php#L386: