Skip to content

Instantly share code, notes, and snippets.

View hightemp's full-sized avatar
🎯
Focusing

Anton Panov hightemp

🎯
Focusing
View GitHub Profile
#!/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
# 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

@hightemp
hightemp / sl2pm.rb
Last active August 29, 2015 14:00
sublime 2 package manager
#!/usr/bin/env ruby
# Commands:
# sl2pm add PACKAGE_NAME # add one of the available packages
# sl2pm add_all STRING N_PAGES # add all packages that matches string
# sl2pm add_popular FROM_PAGE N_PAGES MASK # add popular packages
# sl2pm clear_cache # clear cache
# sl2pm help [COMMAND] # Describe available commands or one spec...
# sl2pm list MASK # list all of the available packages
# sl2pm open PACKAGE_NAME # open in browser package description
class ClassA
@@class_var1 = 1
@var1 = -1
class << self
attr_accessor :attr_var1
def class_method1
puts "\t#{self.class}.class_method1"
puts "\t\t@var1: #{@var1}"
@hightemp
hightemp / gist:11185204
Created April 22, 2014 16:16
Remove PATH duplicates
PATH=$(echo "$PATH" | awk -v RS=':' -v ORS=":" '!a[$1]++')
@hightemp
hightemp / gist:11204728
Created April 23, 2014 06:36
Removing Nessus
To remove Nessus, delete the following directories (including subdirectories) and files:
/Library/Receipts/Nessus*
/Library/LaunchDaemons/com.tenablesecurity.nessusd.plist
/Library/Nessus
/Library/PreferencePanes/Nessus Preferences.prefPane
/Applications/Nessus