#!/bin/bash
gem_file="/tmp/gem_list.txt"
gem list | cut -d" " -f1 > $gem_file
cat $gem_file | xargs gem uninstall -aIx
cat $gem_file | xargs gem install
- Setup ejabber ================ ejabberd is a free and open source instant messaging server written in Erlang/OTP.
ejabberd is cross-platform, distributed, fault-tolerant, and based on open standards to achieve real-time communication.
ejabberd is designed to be a rock-solid and feature rich XMPP server.
ejabberd is suitable for small deployments, whether they need to be scalable or not, as well as extremely big deployments.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rake | |
# encoding: utf-8 | |
require File.expand_path('../config/application', __FILE__) | |
Web::Application.load_tasks | |
desc "Push changes to server" | |
task :push_changes, :comment, :remote, :branch do |task, args| | |
Rake::Task['db:data:dump'].invoke |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while [ `whoami` != 'root' ]; do | |
su - | |
done | |
USER="-u root" | |
mysql_config $USER | |
mysql_install_db $USER |
##How to Identify MySQL Slow Queries and related concerns
###% Slow Queries ####Just demo data so your results will vary.
show status like 'Slow_queries';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PASSLENGTH="10" | |
while [[ $# > 0 ]]; do | |
key="$1" | |
shift | |
case $key in | |
-h|--help) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pushd /tmp | |
wget http://download.skype.com/linux/skype-ubuntu-precise_4.2.0.13-1_i386.deb | |
wget http://get.geo.opera.com/pub/opera/linux/1216/opera_12.16.1860_amd64.deb | |
wget http://download.skype.com/linux/skype-ubuntu-precise_4.2.0.13-1_i386.deb | |
wget http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2%20x64.tar.bz2 | |
dpkg -i *.deb | |
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bitrix .gitignore | |
# files | |
.DS_Store | |
Thumbs.db | |
*.sql | |
.gitignore | |
/.idea/ | |
# core | |
/upload/* |
###1. Получение информации о видеофайле
ffmpeg -i video.avi
###2. Превратить набор картинок в видео
ffmpeg -f image2 -i image%d.jpg video.mpg
Эта команда преобразует все картинки из текущей директории (названные image1.jpg, image2.jpg и т.д.) в видеофайл ideo.mpg