Skip to content

Instantly share code, notes, and snippets.

View jkubacki's full-sized avatar

Jakub Kubacki jkubacki

  • Benztown Branding
  • remote
View GitHub Profile
@jkubacki
jkubacki / gist:e2dd904bd648b0bd4554
Created January 21, 2015 18:47
Mac uninstall elasticsearch
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep elasticsearch
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
launchctl remove homebrew.mxcl.elasticsearch
pkill -f elasticsearch
@jkubacki
jkubacki / gist:bdf4f3fcc62699fa9707
Created January 21, 2015 18:44
Mac uninstall mongodb
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep mongo
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
launchctl remove homebrew.mxcl.mongodb
pkill -f mongod
@jkubacki
jkubacki / turbolinks-jquery.js
Created December 8, 2014 23:29
turbolinks jquery
@jkubacki
jkubacki / git_aliases.txt
Last active August 29, 2015 14:10
git aliases
git config --global alias.a 'add --all'
git config --global alias.st 'status'
git config --global alias.cm 'commit -m'
git config --global alias.co 'checkout'
@jkubacki
jkubacki / sublime-settings-packages
Last active August 29, 2015 14:10
Sublime3 settings & packages
{
"rulers": [80],
"tab_size": 2,
"translate_tabs_to_spaces": true
}
Sidebar Enhancements
Emmet - expanding html, css
Gitgutter - changes in git
@jkubacki
jkubacki / gist:8c2e0edad5dcd7967da9
Created November 1, 2014 10:55
ubuntu fix locale
edit the file /etc/environment
add one line with your LANG,
like this LC_ALL="en_US.UTF-8"
save and reboot
@jkubacki
jkubacki / greasemonkey-script.js
Last active August 29, 2015 14:08
Greasemonkey nms
// ==UserScript==
// @name Nms highlighter
// @namespace e-price.com.pl
// @include http://ms.allegro.pl/*
// @version 1
// @grant none
// ==/UserScript==
var logoutElement = document.getElementById("user-logout");
if (logoutElement) {
var buttonContent = logoutElement.previousSibling.previousSibling.innerHTML;
@jkubacki
jkubacki / tampermonkey.js
Last active August 29, 2015 14:08
Tampermonkey nms
// ==UserScript==
// @name Nms account highlighter
// @namespace http://e-price.com.pl
// @version 1.0
// @description Set background color for allegro nms account.
// @author Jakub Kubacki
// @match http://ms.allegro.pl/*
// @grant none
// ==/UserScript==
var logoutElement = document.getElementById("user-logout");
@jkubacki
jkubacki / file.rb
Last active August 29, 2015 14:06
Replace files in catalog tree from another catalog. Without fileutils and with binary flags for microsoft, fuckin, windows.
catalog_search = 'test'
catalog_copy_from = 'test2'
Dir.glob("#{catalog_search}/**/*").each do |name_target|
next if File.directory? name_target
name_main = "#{catalog_copy_from}/#{File.basename name_target}"
if File.file? name_main
content = File.open(name_main, 'rb') {|file| file.read }
File.open(name_target, 'wb') {|file| file.write(content) }
end
end