Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mauro Locatelli crivotz

🏠
Working from home
View GitHub Profile
@crivotz
crivotz / .Xmodmap
Created Aug 3, 2015
Change Caps_lock into Control left
View .Xmodmap
!Turn Caps Lock into another Control key
keycode 66 = Control_L
clear Lock
add Control = Control_L
@crivotz
crivotz / themes.cfg
Created Aug 3, 2015
Aretes Theme.cfg for fluxbox
View themes.cfg
style.name: Aretes
style.author: Mauro Locatelli
style.date: August 3, 2015
style.credits:
style.comment:
toolbar: flat
toolbar.pixmap: toolbar.xpm
toolbar.textColor: #c0c0c0
toolbar.justify: center
@crivotz
crivotz / .conkyrc
Last active Aug 29, 2015
Aretes Conky theme .conkyrc (two monitors)
View .conkyrc
#avoid flicker
double_buffer yes
#own window to run simultanious 2 or more conkys
own_window yes
own_window_transparent no
own_window_type panel
own_window_hints undecorate,sticky,skip_taskbar,skip_pager
#borders
@crivotz
crivotz / xorg.conf
Created Aug 3, 2015
Xorg.conf for dual monitor
View xorg.conf
Section "ServerLayout"
Identifier "aticonfig Layout"
Screen 0 "aticonfig-Screen[0]-0" 0 0
Screen "aticonfig-Screen[0]-1" RightOf "aticonfig-Screen[0]-0"
EndSection
Section "Module"
EndSection
Section "ServerFlags"
View cookiechoices.css
/* Panel */
#cookieChoiceInfo {
background-color: #6a7ed5; /* Panel background color */
border-top: 4px solid #c8b13c; /* Border top color and type */
color: #FFFFFF; /* Font color */
padding: 10px;
opacity: .8; /* Opacity */
}
/*More info link*/
@crivotz
crivotz / carrier_wave
Created Jun 11, 2015
Check if image? and do resize
View carrier_wave
version :thumb, :if => :image? do
process :resize_to_fit => [50, 50]
end
protected
def image?(new_file)
new_file.content_type.include? 'image'
end
View 660-init-deb.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@crivotz
crivotz / _search_form
Created Feb 9, 2015
Filter form with simple_form base on filterable by Justin Weiss ( http://goo.gl/xr10rK )
View _search_form
<%= simple_form_for :user, :method => 'get', :url => users_path, :html => {:class => ''} do |f| %>
<div class="form-group form-group-sm col-xs-12 col-sm-4 col-md-4 col-lg-3">
<%= f.input :username_like, input_html: { name: 'username_like', :value => params[:username_like] }, label: t('fields.user.username'), :required => false %>
<%= f.input :is_active_check, input_html: { name: 'is_active_check' }, label: t('fields.user.is_active'), as: :select, checked_value: true, unchecked_value: false, :required => false, :selected => params[:is_active_check], :include_blank => '' %>
<%= f.input :acl_id_ref_check, collection: Acl.all, input_html: { name: 'acl_id_ref_check' }, as: :select, label_method: :description, label: t('fields.user.acl_id'), value_method: :id, :selected => params[:acl_id_ref_check], :include_blank => '', :required => false %>
<%= f.input :locale, :as => :hidden, :input_html => {:name => 'locale', :value => params[:locale] } %>
<%= f.button :submit, t('search'), class: "btn-suc