Skip to content

Instantly share code, notes, and snippets.

View hightemp's full-sized avatar
🎯
Focusing

Anton Panov hightemp

🎯
Focusing
View GitHub Profile

gems reinstall

#!/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
  1. 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.

#!/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
#!/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 |
+---------------+-------+
#!/bin/bash
PASSLENGTH="10"
while [[ $# > 0 ]]; do
key="$1"
shift
case $key in
-h|--help)
#!/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

Get all href sources from "a" tags exlude containing mailto links

(<a[^>]*href\s*=\s*["'])((?!mailto:|https?:|#)[^"']*|http:\/\/(www\.)*sitename[^"']*)
# 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