Skip to content

Instantly share code, notes, and snippets.

View cema-sp's full-sized avatar
🗺️
Living life

Semyon Pisarev cema-sp

🗺️
Living life
View GitHub Profile
@cema-sp
cema-sp / Apache-Rails-Caching
Created September 18, 2014 10:31
Apache Rails Caching
<LocationMatch "^/assets/.*$">
Header unset Last-Modified
Header unset ETag
FileETag None
ExpiresActive On
ExpiresDefault "access plus 1 year"
</LocationMatch>
@cema-sp
cema-sp / services_restart.sh
Created March 24, 2015 08:01
Restart services from list
#!/bin/bash
# Services to start
SERVICES=(
amavis
apache2
clamav-daemon
clamav-freshclam
cron
dbus
@cema-sp
cema-sp / sources.list
Created March 24, 2015 08:02
Ubuntu Trusty RU sources
deb http://ru.archive.ubuntu.com/ubuntu/ trusty main restricted universe
# deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe
deb http://ru.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
# deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
# deb http://ru.archive.ubuntu.com/ubuntu/ trusty-backports main restricted
# deb-src http://ru.archive.ubuntu.com/ubuntu/ trusty-backports main restricted
deb http://ru.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
favicon.ico, который кладем в корень сайта
В html
<link rel="apple-touch-icon" sizes="192x192" href="favicons/favicon-192x192.png">
<link rel="icon" type="image/png" sizes="192x192" href="favicons/favicon-192x192.png">
<meta name="msapplication-config" content="browserconfig.xml">
В browserconfig.xml
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
@cema-sp
cema-sp / gist:97d2d4c824510b3dcddd
Created June 26, 2015 10:54
config/application.rb
# config/application.rb
config.generators do |g|
g.assets = false
g.helper = false
end
config.action_controller.include_all_helpers = false
config.active_record.schema_format = :sql
config.colorize_logging = false
@cema-sp
cema-sp / README.md
Created November 23, 2015 07:37
CoreOS configuration

Create config drive:

mkdir -p /tmp/new-drive/openstack/latest
cp user_data /tmp/new-drive/openstack/latest/user_data
mkisofs -R -V config-2 -o configdrive.iso /tmp/new-drive
rm -r /tmp/new-drive
@cema-sp
cema-sp / httpd.conf
Created November 25, 2015 08:46
Apache config for Middleman (from tille)
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
uptime
dmesg | tail
vmstat 1
mpstat -P ALL 1
pidstat 1
iostat -xz 1
free -m
sar -n DEV 1
sar -n TCP,ETCP 1
top
@cema-sp
cema-sp / webpack-dev-server.coffee
Created February 2, 2016 11:11
Gulp task for webpack-dev-server
gulp = require 'gulp'
util = require 'gulp-util'
webpack = require 'webpack'
WebpackDevServer = require 'webpack-dev-server'
webpackConfig = require '../../../config/webpack.js'
gulp.task 'webpack-dev-server', (callback) ->
# Start a webpack-dev-server
myConfig = Object.create webpackConfig
compiler = webpack myConfig
@cema-sp
cema-sp / update.sh
Created March 21, 2016 13:32
Bundle update local source
bundle update --local --source ./path