Skip to content

Instantly share code, notes, and snippets.

@1v
1v / gist:77595e676132a660843c
Last active July 14, 2016 18:49
Making production on port 80 and development on any other

Making production on port 80 and development on any other

Go to /etc/nginx/conf.d delete all files in it and create two files MyAppDevelopment.conf and MyAppProduction.conf (change MyApp to your app name).

Add to MyAppDevelopment.conf:

upstream MyAppDevelopment {
  server              unix:///tmp/MyAppDevelopment.sock;
}
@1v
1v / gist:a38f247c41ca60f6e48a
Last active August 29, 2015 14:03 — forked from ancap/gist:7616833
Ruby on Rails "Hellow World" app

Ruby on Rails "Hellow World" app

Run:

rails g controller StaticPages index

In config/routes.rb add:

root "static_pages#index"

###Show variable contents from controller in view###

@1v
1v / gist:ff5c3cd78b74e3248c1a
Last active August 29, 2015 14:01
How to pull request in MediaWIki
$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:
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
@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 ./
@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;
<?
header('Content-type: text/html; charset=utf-8');
error_reporting( E_ALL );
ini_set( 'display_errors', 1 );
echo "<pre>";
passthru("echo $HOME");
echo "<br>";

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

Чтобы узнать соответствие комбинаций и символов нужно в консоли набрать
C:\Users\root>chcp
Текущая кодовая страница: 866
Далее смотрим http://www.ascii-codes.com/cp866.html
▲ — в windows соответствует Alt + 30. Знак бесконечность набрать невозможно.
Еще можно charmap в консоли набрать (откроется окно и там он должен быть, поиск infinity).