Skip to content

Instantly share code, notes, and snippets.

View sletix's full-sized avatar
💭
^^

Oleg Artamonov sletix

💭
^^
View GitHub Profile
"##{project.title}/#{folder.title}/#{document.title} - #{document.state}"
#Antimony Plant/Antimony Plant/ - processing
#Antimony Plant/Antimony Plant/ - processing
#Antimony Plant/Antimony Plant/ - processing
#Antimony Plant/Antimony Plant/ - processing
#Antimony Plant/Antimony Plant/ - processing
#Antimony Plant/Antimony Plant/ - processing
#Antimony Plant/Antimony Plant/ - processing
#Antimony Plant/Antimony Plant/ - processing
@sletix
sletix / bluepill
Created October 2, 2012 23:15
init.d script with mixed pills
#!/bin/sh
### BEGIN INIT INFO
# Provides: bluepill
# Required-Start: $local_fs $remote_fs $network $syslog $time
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: bluepill daemon, providing process monitoring
# Description: bluepill is a monitoring tool. More info at http://github.com/arya/bluepill.
@sletix
sletix / gist:3803276
Created September 29, 2012 05:36
libreoffice
### TextDocument
fmts.add('document', 'bib', 'bib', 'BibTeX', 'BibTeX_Writer') ### 22
fmts.add('document', 'doc', 'doc', 'Microsoft Word 97/2000/XP', 'MS Word 97') ### 29
fmts.add('document', 'doc6', 'doc', 'Microsoft Word 6.0', 'MS WinWord 6.0') ### 24
fmts.add('document', 'doc95', 'doc', 'Microsoft Word 95', 'MS Word 95') ### 28
fmts.add('document', 'docbook', 'xml', 'DocBook', 'DocBook File') ### 39
fmts.add('document', 'docx', 'docx', 'Microsoft Office Open XML', 'Office Open XML Text')
fmts.add('document', 'docx7', 'docx', 'Microsoft Office Open XML', 'MS Word 2007 XML')
fmts.add('document', 'fodt', 'fodt', 'OpenDocument Text (Flat XML)', 'OpenDocument Text Flat XML')
fmts.add('document', 'html', 'html', 'HTML Document (OpenOffice.org Writer)', 'HTML (StarWriter)') ### 3
@sletix
sletix / gist:3710506
Created September 12, 2012 22:39
vpc-test
# Tests
cisco.pdf (111 pages):
~ 6.40 minutes **current-production-version**
# PNG
# Docsplit.extract_images(path, size: '1000x', format: [:png], output: dir) in rails-side
~ 7 minutes with (vpc - 5m) **first-vpc-version**
# PNG
# Docsplit.extract_images(path, size: '1000x', format: [:png], output: dir)
@sletix
sletix / nginx.conf
Created July 1, 2012 14:13
nginx config
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
@sletix
sletix / thinking_sphinx
Created July 1, 2012 14:03
`/etc/default/thinking_sphinx.conf` and `/etc/init.d/thinking_sphinx`
#!/bin/bash -e
### BEGIN INIT INFO
# Provides: thinking_sphinx
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop Sphinx daemon for Thinking Sphinx
### END INIT INFO
CONFIG_FILE=/etc/default/thinking_sphinx.conf
. $CONFIG_FILE || exit
@sletix
sletix / commit-msg
Last active July 1, 2016 13:37
Git hook for put pivotal-ticket-id in commit msg
#!/bin/bash
tempfile=`mktemp`;
ticket=`git branch|grep '* '|cut -f 2 -d '-'`;
message=`cat $1`;
if [[ $ticket =~ ^[0-9]{7,}$ ]]; then
echo -e "$message\n\n--\nPivotalTracker: [#$ticket] https://www.pivotaltracker.com/story/show/$ticket" >> "$tempfile";
mv "$tempfile" "$1"
else
@sletix
sletix / gist:2654476
Created May 10, 2012 17:02
Players results
- @players.each do |player|
%h3= player.title
%b Player results:
%ul
- player.results.each do |result|
%li= result.current_handicap
|~bem/
| |~blocks/
| | |~b-confirm-logout/
| | | |-b-confirm-logout.deps.js
| | | `-b-confirm-logout.js
| | |~b-desktop/
| | | |~__start-menu/
| | | | |-b-desktop__start-menu.deps.js
| | | | `-b-desktop__start-menu.js
| | | |~__sub-start-menu/
require_once 'Bowling.php';
class DescribeNewBowlingGame extends PHPSpec_Context
{
private $_bowling = null;
public function before()
{
$this->_bowling = new Bowling;