Skip to content

Instantly share code, notes, and snippets.

View bartlomiejdanek's full-sized avatar

Bartłomiej Danek bartlomiejdanek

View GitHub Profile
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
# set-option -g status-style bg=black,fg=cyan# bg=base02, fg=yellow
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-jontinuum'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-pain-control'
@bartlomiejdanek
bartlomiejdanek / abc
Last active September 9, 2022 16:34
test
123
@bartlomiejdanek
bartlomiejdanek / hello_world.py
Created May 29, 2021 11:30
Hello World Examples
class HelloWorld:
def __init__(self, name):
self.name = name.capitalize()
def sayHi(self):
print "Hello " + self.name + "!"
hello = HelloWorld("world")
hello.sayHi()
@bartlomiejdanek
bartlomiejdanek / hello.rb
Created January 18, 2020 08:48
description ABC
content XYZ
@bartlomiejdanek
bartlomiejdanek / hello.rb
Created January 18, 2020 08:42
description ABC
content XYZ
class ImportDateStatsFromSparkExportBackfill < ImportDateStatsFromSparkExport
FROM_DATE = Date.new(2016, 6, 1)
TO_DATE = Date.new(2017, 1, 18)
private
def process_location(location)
(FROM_DATE..TO_DATE).each do |date|
$backfill_date = date
Rails.logger.info "===> Importing for #{$backfill_date}"
@bartlomiejdanek
bartlomiejdanek / splitter.rb
Created September 23, 2013 09:14
split your csv files
require 'csv'
infile = ARGV[0]
slice = ARGV[1] || 100
origin = CSV.open infile
all_lines = origin.readlines
header = all_lines.first
all_lines.delete_at(0)
@bartlomiejdanek
bartlomiejdanek / hash_fail.rb
Created April 9, 2013 05:55
hash clone/dup/deep_dup fail
require 'active_support/core_ext/hash/deep_dup'
h = {a: {b: :c}, d: {e: {f: :g}}}
p "Base h: #{h.object_id}"
p "Base h[:a]: #{h[:a].object_id}"
p "Base h[:d][:e][:f] #{h[:d][:e][:f].object_id}"
puts "--------------------------------------------------------------"
_dup = h.dup
p "Dup h: #{_dup.object_id}"
p "Dup h[:a]: #{_dup[:a].object_id}"
p "Dup h[:d][:e][:f] #{_dup[:d][:e][:f].object_id}"
" Improve move speed
let g:boostmove=0
set updatetime=500
au CursorMoved * call BoostMoveON()
au CursorMovedI * call BoostMoveON()
au CursorHold * call BoostMoveOFF()
au CursorHoldI * call BoostMoveOFF()
function BoostMoveON()
if (winline() != line('$')) && (line('.') != 1)
if (winline() == winheight('.')) || (winline() == 1)
@bartlomiejdanek
bartlomiejdanek / poc_constantize
Created February 14, 2013 14:44
poc_constantize rails issue
➜ projects git clone git://github.com/stevo/poc_constantize.git
Cloning into 'poc_constantize'...
remote: Counting objects: 66, done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 66 (delta 2), reused 66 (delta 2)
Receiving objects: 100% (66/66), 26.54 KiB, done.
Resolving deltas: 100% (2/2), done.
➜ projects cd poc_constantize
➜ poc_constantize git:(master) rvm use 1.9.3@poc --create
Using /Users/bard/.rvm/gems/ruby-1.9.3-p385 with gemset poc