Skip to content

Instantly share code, notes, and snippets.

View effrenus's full-sized avatar
🖖
(๑•́ ₃ •̀๑)

Sazonov Alexey effrenus

🖖
(๑•́ ₃ •̀๑)
View GitHub Profile
~ を余儀なくされる
Хоть мне и не нравится, но в такой ситуации, что [~] не избежать. Часто встречается в новостях.
~ を余儀なくさせる
Обстоятельства вынуждают кого-нибудь/что-нибудь сделать [~] против воли.
// JSTS. See https://github.com/bjornharrtell/jsts
// Licenses:
// https://github.com/bjornharrtell/jsts/blob/master/LICENSE_BHARRTELL_BSD3.txt
// https://github.com/bjornharrtell/jsts/blob/master/LICENSE_EPLv1.txt
// https://github.com/bjornharrtell/jsts/blob/master/LICENSE_MDAVIS_BSD3.txt
// https://github.com/bjornharrtell/jsts/blob/master/LICENSE_MIT.txt
// https://github.com/bjornharrtell/jsts/blob/master/LICENSE_VSI_BSD3.txt
!function t(e,n,i){function r(o,a){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!a&&u)return u(o,!0);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[o]={exports:{}};e[o][0].call(h.exports,function(t){var n=e[o][1][t];return r(n?n:t)},h,h.exports,t,e,n,i)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(t,e,n){(function(e){"use strict";!function(){function i(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function r(){}function s(){}f
@effrenus
effrenus / InstallRedmine.md
Last active January 20, 2016 16:11
Установка Redmine

Installing redmine

sudo apt-get update
sudo apt-get install libmysqlclient-dev
sudo apt-get install mysql-server libmysqlclient-dev git-core subversion imagemagick libmagickwand-dev libcurl4-openssl-dev

##Clone redmine from github clone repo git clone git://github.com/redmine/redmine.git redmine

#!/bin/bash
TMPDIR="/tmp/psnr_tmp"
PSNR_LEVEL=40
mkdir $TMPDIR
ls *.jpg | while read file; do
echo $file
echo "-----------------"
@effrenus
effrenus / install_imgo.sh
Created November 17, 2013 10:34
Install imgo via shell script Source: https://github.com/imgo/imgo
#!/bin/bash
## storing current dir
pushd . > /dev/null
### Installing needed packages
sudo apt-get install advancecomp libimage-exiftool-perl imagemagick \
optipng libjpeg-progs gifsicle pngnq \
tar unzip libpng-dev git
@effrenus
effrenus / Optimize JPEG bash
Last active December 26, 2015 07:19
Small bash script that optimize jpeg images by their PSNR metrics. Compress original file in variety quality from low to high and compare PSNR. If it greater then threshold and size less, copy tmp file to working dir and go to next file. On big files slow, cant find ImageMagick alternative. Any suggestions, ideas?
#!/bin/bash
TMPDIR="/tmp/psnr_tmp"
PSNR_LEVEL=39
mkdir $TMPDIR
ls *.jpg | while read file; do
echo $file
echo "-----------------"
id,name,amount
109,"building",1456894
164,"house",1383613
7,"Shopping and services",839415
17,"store / shop",831628
203,"school",676869
4,"dining and leisure",671035
74,"restaurant",385073
194,"park",283545
163,"sport venue",274433