Skip to content

Instantly share code, notes, and snippets.

View benjaminmateev's full-sized avatar

Benjamin Mateev benjaminmateev

View GitHub Profile
Nov 1 06:52:01 definingthenextdecade CRON[30362]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ))
Nov 1 06:52:05 systemd[1]: Starting Daily apt upgrade and clean activities...
Nov 1 06:52:25 systemd[1]: Reloading.
Nov 1 06:52:26 systemd[1]: Stopping LSB: automatic crash report generation...
Nov 1 06:52:26 apport[30649]: * Stopping automatic crash report generation: apport
Nov 1 06:52:26 apport[30649]: ...done.
Nov 1 06:52:26 systemd[1]: Stopped LSB: automatic crash report generation.
Nov 1 06:52:26 systemd[1]: Reloading.
Nov 1 06:52:26 systemd[1]: Starting Daily apt download activities...
Nov 1 06:52:26 systemd[1]: Reloading.
log_level :info
log_location STDOUT
node_name 'benjaminmateev'
client_key '/Users/benjamenmateev/Sites/xxx/chef/chef-repo/.chef/benjaminmateev.pem'
validation_client_name 'chef-validator'
validation_key '/etc/chef/validation.pem'
chef_server_url 'http://chef.xxx.com:4000'
cache_type 'BasicFile'
cache_options( :path => '/Users/benjamenmateev/Sites/xxx/chef/chef-repo/.chef/checksums' )
@benjaminmateev
benjaminmateev / gist:1125355
Created August 4, 2011 14:55
jQuery UI Autocomplete in Coffeescript
$ ->
$('#header_search').autocomplete
source: "/search/autocomplete"
formatItem: (item) ->
"<img src=\"#{item.url}\" />#{item.title}"
select: (event, ui) ->
location.href = ui.item.href
@benjaminmateev
benjaminmateev / gist:1101450
Created July 23, 2011 13:51
Workaround for Debian Bug
tail -f /va-bash: /dev/fd/62: No such file or directory
-bash: /dev/fd/60: No such file or directory
# Workaround:
sudo ln -s /proc/self/fd /dev/fd
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
@benjaminmateev
benjaminmateev / gist:857161
Created March 6, 2011 09:19
Categories Index not working in Magento Admin
app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php
<?php
public function getRowUrl($row) {
return $this->getUrl(’*/*/edit’, array(’page_id’ => $row->getId()));
}
?>
# vim /etc/sysctl.conf
sunrpc.ve_allow_rpc = 1
fs.nfs.ve_allow_nfs = 1
kernel.ve_allow_kthreads = 1
# sysctl -p
# vzctl stop 101
# vzctl set 101 --features "nfs:on" --save
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
@benjaminmateev
benjaminmateev / application.rb
Created June 18, 2015 13:47
Default Application.rb
# config/application.rb
# Don't generate assets and helpers
config.generators do |g|
g.assets = false
g.helper = false
end
# Don't include all helpers globally, just the right helper for the current namespace
config.action_controller.include_all_helpers = false