This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "browser", | |
"conditions": [ | |
{ | |
"type": "frontmost_application_if", | |
"bundle_identifiers": [ | |
"^com\\.apple\\.Safari", | |
"^com\\.google\\.Chrome", | |
"^com\\.vivaldi\\.Vivaldi" | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"ask_for_confirmation_before_quitting": true, | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false, | |
"unsafe_ui": false | |
}, | |
"profiles": [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set ctrl to work as command | |
#make sublime to be opened from browser (when debugging RoR apps): https://github.com/inopinatus/sublime_url | |
#fix command + pgup command + pgdown to switch tabs | |
defaults write -g NSUserKeyEquivalents -dict-add "Select Previous Tab" "@\UF72C" "Previous Tab" "@\UF72C" "Previous Workspace" "@\UF72C" "Select Next Tab" "@\UF72D" "Next Tab" "@\UF72D" "Next Workspace" "@\UF72D" "Show Previous Tab" "@\UF72C" "Show Next Tab" "@\UF72D" | |
#setup keybindings | |
https://gist.github.com/trusktr/1e5e516df4e8032cbc3d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//компактная версия форм active_admin | |
//usage: f.inputs class: "inputs inputs-compact" do | |
// f.input :title, wrapper_html: { class: "input-lg" } | |
// f.input :note, wrapper_html: { class: "input-md new-line" } | |
// end | |
//to be placed in /app/assets/stylesheets | |
//to be included in /app/assets/active_admin.scss | |
//поправлена высота чекбокса, вместо нее сделана высота всей группы | |
//version 1.01 - отображение ошибок в has_many | |
//1.02 - fix для sortable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#copy ~/.ssh/* keys to new server | |
#add your ssh id_rsa.pub to source server authorized keys | |
#edit /etc/hosts add 111.111.111.111 source | |
scp root@source:/etc/nginx/nginx.conf /etc/nginx/ | |
scp -r root@source:/etc/nginx/sites-enabled/ /etc/nginx/ | |
scp -r root@source:/etc/letsencrypt /etc/ | |
#copy /var/www folder | |
ssh root@source 'cd /var; rm www.zip; zip -r www www -x *.log */tmp/* */current/* */releases/* */bundle/*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"color_scheme": "Monokai.sublime-color-scheme", | |
"file_exclude_patterns": | |
[ | |
".byebug_history", | |
"*.sqlite3" | |
], | |
"folder_exclude_patterns": | |
[ | |
".svn", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"file_exclude_patterns": | |
[ | |
".byebug_history", | |
"*.sqlite3" | |
], | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"file_exclude_patterns": | |
[ | |
".byebug_history", | |
"*.sqlite3" | |
], | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export `xinput list | grep -i synaptics | awk '{ print $5 }'` | |
echo "device id: $id" | |
xinput --set-prop "$id" "Synaptics Noise Cancellation" 20 20 | |
xinput --set-prop "$id" "Synaptics Finger" 35 45 250 | |
xinput --set-prop "$id" "Synaptics Scrolling Distance" 180 180 | |
echo "all fixed" | |
true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function text_fit() { | |
$(".text-fit").each(function() { | |
var square = $(this).width()*$(this).height() | |
var chars = $(this).text().trim().length | |
var letter_square = square/chars; | |
var letter_height = Math.sqrt(letter_square)*4/3 | |
$(this).css({"line-height": letter_height+"px", "font-size": letter_height+"px"}) | |
}) |
NewerOlder